-
Notifications
You must be signed in to change notification settings - Fork 134
140 lines (124 loc) · 4.25 KB
/
Copy pathbuild.yml
File metadata and controls
140 lines (124 loc) · 4.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Build
on:
push:
branches: [ main, 'release/**' ]
pull_request:
branches: [ main, 'release/**' ]
jobs:
build-windows:
runs-on: windows-2022
env:
BUILD_SENTRY_ENVIRONMENT: ${{ github.event_name == 'pull_request' && 'github-testing' || 'github-production' }}
strategy:
matrix:
include:
- build-flavour: debug
output-subdir: _Comp64Debug
- build-flavour: debugoptimized
output-subdir: _Comp64DebugOptimized
- build-flavour: release
output-subdir: _Comp64Release
steps:
- name: Setup variables
uses: actions/github-script@v9
with:
script: core.exportVariable('GITHUB_SHA_SHORT', context.sha.substring(0, 7))
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: recursive
- name: Setup Meson
run: pip install meson==1.1.0
- name: Build
shell: pwsh
run: |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
. .\build_common.ps1
PerformBuild -BuildFlavour ${{matrix.build-flavour}} -BuildSubDir ${{matrix.output-subdir}} -Backend ninja -EnableTracy false copy_output
- name: Upload build logs
if: ${{ always() }}
continue-on-error: true
uses: actions/upload-artifact@v7
with:
name: build-logs-${{github.run_number}}-${{env.GITHUB_SHA_SHORT}}-${{matrix.build-flavour}}
path: |
${{matrix.output-subdir}}\meson-logs\meson-log.txt
${{matrix.output-subdir}}\update-deps.log
update-deps.log
if-no-files-found: ignore
retention-days: 30
- name: Copy readme
run: copy artifacts_readme.txt _output
- name: Upload x64 binaries
uses: actions/upload-artifact@v7
with:
name: rtx-remix-for-x64-games-${{github.run_number}}-${{env.GITHUB_SHA_SHORT}}-${{matrix.build-flavour}}
path: |
_output\*.dll
_output\*.pdb
_output\*.txt
_output\usd\*
- name: Move DXVK
shell: pwsh
run: |
mkdir _output\.trex
Move-Item -Path _output\*.dll -Destination _output\.trex\
Move-Item -Path _output\*.pdb -Destination _output\.trex\
Move-Item -Path _output\usd -Destination _output\.trex\usd
- name: Build Bridge
shell: pwsh
run: |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
pushd bridge
. .\build_bridge_${{matrix.build-flavour}}.bat
popd
- name: Copy Bridge
shell: pwsh
run: |
Copy-Item -Recurse -Path bridge\_output\* -Destination _output\ -Force
- name: Upload x86 binaries
uses: actions/upload-artifact@v7
with:
name: rtx-remix-for-x86-games-${{github.run_number}}-${{env.GITHUB_SHA_SHORT}}-${{matrix.build-flavour}}
include-hidden-files: true
path: |
_output\*.dll
_output\*.exe
_output\*.pdb
_output\*.txt
_output\.trex\*.dll
_output\.trex\*.exe
_output\.trex\*.pdb
_output\.trex\usd\*
notify-slack-on-failure:
runs-on: ubuntu-latest
needs: build-windows
if: ${{ failure() }}
steps:
- name: Notify Slack
uses: slackapi/slack-github-action@v3
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
text: "<!here> Build workflow failed for ${{ github.repository }}"
blocks:
- type: section
text:
type: mrkdwn
text: "<!here> :rotating-light-red: *Build workflow failed* for `${{ github.repository }}`"
- type: section
fields:
- type: mrkdwn
text: "*Ref:*\n`${{ github.ref_name }}`"
- type: mrkdwn
text: "*Commit:*\n`${{ github.sha }}`"
- type: mrkdwn
text: "*Event:*\n`${{ github.event_name }}`"
- type: actions
elements:
- type: button
text:
type: plain_text
text: View workflow run
url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"