forked from odamex/odamex
-
Notifications
You must be signed in to change notification settings - Fork 0
130 lines (127 loc) · 3.99 KB
/
windows.yml
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
name: Windows
on:
push:
branches-ignore:
- 'release/[0-9]+.[0-9]+.[0-9]+'
pull_request:
jobs:
pre_job:
name: Build Preparation
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.check_skip.outputs.should_skip }}
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Check for build skip
id: check_skip
run: bash ci/check-skip.sh
build:
name: Build (Visual Studio)
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: windows-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Install Python packages
uses: insightsengineering/pip-action@v2
with:
packages: |
b2sdk
PyNaCl
- name: Prepare build
run: .\ci\win-buildgen.ps1
- name: Turn on problem matcher
uses: ammaraskar/msvc-problem-matcher@master
- name: Run build
run: cmake --build .\build\ --config RelWithDebInfo --parallel
- name: Run unit tests
run: .\build\tests\unit-tests\RelWithDebInfo\odagtest
- name: Prepare artifact
run: .\ci\win-artifact.ps1
- name: Stage artifacts for testing
run: .\ci\win-prepare-demotest.ps1
- name: Download OdaTests and Testing Resources
run: .\ci\win-get-demotester.ps1
env:
DEMOTESTER_URL: ${{ vars.DEMOTESTER_DOWNLOAD_URL }}
DEMORESOURCES_URL: ${{ vars.DEMORESOURCES_DOWNLOAD_URL }}
continue-on-error: true
- name: Decrypt IWADs
run: |
python .\secret.py decrypt plutonia
python .\secret.py decrypt tnt
python .\secret.py decrypt doom
python .\secret.py decrypt doom1
python .\secret.py decrypt doom2
python .\secret.py decrypt hacx
env:
SECRET_KEY: ${{ secrets.DEMOTESTER_IWAD_KEY }}
working-directory: .\build\demotester
continue-on-error: true
- name: Run OdaTests
run: python .\odatestcases.py
env:
ODAMEX_BIN: ..\demotest\odamex.exe
working-directory: .\build\demotester
continue-on-error: true
- name: Upload artifact to B2
run: python .\ci\upload-b2.py .\build\archive Win-x64
env:
B2_APP_KEY: ${{ secrets.B2_APP_KEY }}
B2_BUCKET_ID: ${{ secrets.B2_BUCKET_ID }}
B2_KEY_ID: ${{ secrets.B2_KEY_ID }}
- name: Upload artifact to Github
uses: actions/upload-artifact@v4
with:
name: Odamex-Win-x64
path: 'build/artifact/*'
build-x32:
name: Build (Visual Studio, 32-bit)
runs-on: windows-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Install Python packages
uses: insightsengineering/pip-action@v2
with:
packages: |
b2sdk
- name: Prepare build
run: .\ci\win-x32-buildgen.ps1
- name: Run build
run: cmake --build .\build-x32\ --config RelWithDebInfo --parallel
- name: Prepare artifact
run: .\ci\win-x32-artifact.ps1
- name: Upload artifact to B2
run: python .\ci\upload-b2.py .\build-x32\archive Win-x32
env:
B2_APP_KEY: ${{ secrets.B2_APP_KEY }}
B2_BUCKET_ID: ${{ secrets.B2_BUCKET_ID }}
B2_KEY_ID: ${{ secrets.B2_KEY_ID }}
- name: Upload artifact to Github
uses: actions/upload-artifact@v4
with:
name: Odamex-Win-x32
path: 'build/artifact/*'
# build-mingw:
# name: Build (MinGW)
# runs-on: windows-latest
# steps:
# - name: Checkout source
# uses: actions/checkout@v4
# - name: Checkout submodules
# run: git submodule update --init --recursive
# - name: Install packages
# uses: crazy-max/ghaction-chocolatey@v1
# with:
# args: install ninja
# - name: Prepare build
# run: .\ci\win-mingw-buildgen.ps1
# - name: Run build
# run: cmake --build .\build-gcc\