-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (80 loc) · 2.43 KB
/
build.yaml
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
name: build
on:
push:
env:
BUILD_TYPE: Release
SK_VERSION: nover
jobs:
build-linux:
runs-on: ubuntu-22.04
env:
CC: gcc-12
CXX: g++-12
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Configure stuff
run: |
sudo apt install g++-12
mkdir ${{github.workspace}}/build
cd ${{github.workspace}}/build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/tmp ..
echo "SK_VERSION=$(cat version)" >> $GITHUB_ENV
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . -j 6
- name: Install
working-directory: ${{github.workspace}}/build
run: |
cmake --build . --target install
cd ../tmp
./idtech_toolset
rm idtech_toolset.config
mv ../LICENSE .
# mv ../README.md .
tar -cvaf ../idTechToolset-v${{env.SK_VERSION}}-linux-amd64.tar.xz .
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: idTechToolset-linux-amd64
path: ${{github.workspace}}/idTechToolset-v${{env.SK_VERSION}}-linux-amd64.tar.xz
retention-days: 5
build-widle:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Configure stuff
run: |
choco install ninja
mkdir ${{github.workspace}}/build
cd ${{github.workspace}}/build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{github.workspace}} ..
echo "SK_VERSION=$(Get-Content -Path ./version)" >> $env:GITHUB_ENV
env:
CC: clang
CXX: clang++
- name: Build
working-directory: ${{github.workspace}}/build
run: |
cmake --build . -j 6
- name: Install
run: |
cmake --build build --target install
bin/idtech_toolset.exe
del bin/idtech_toolset.config
copy LICENSE bin/LICENSE
# copy README.md bin/README.md
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: idTechToolset-v${{env.SK_VERSION}}-win64
path: ${{github.workspace}}/bin
retention-days: 5