-
Notifications
You must be signed in to change notification settings - Fork 0
139 lines (118 loc) · 3.72 KB
/
build.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
131
132
133
134
135
136
137
138
139
name: build
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup_alpine
uses: jirutka/setup-alpine@v1
with:
branch: edge
- name: add_packages
run: |
rm /var/cache/apk/*
apk add 7zip autoconf automake bash ccache clang lld llvm llvm-linker-tools gcc g++ cmake coreutils diffutils gawk gettext-dev git libtool make meson musl-dev nasm patch pkgconf po4a py3-mako samurai texinfo util-linux-misc yasm
shell: alpine.sh --root {0}
- name: setup_git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
shell: alpine.sh --root {0}
- name: load_cache_build
uses: actions/cache/restore@main
with:
path: build
key: cached_build
- name: load_cache_ltocache
uses: actions/cache/restore@main
with:
path: build/install/x86_64-w64-mingw32/ltocache
key: ltocache
- name: load_cache_ccache
uses: actions/cache/restore@main
with:
path: build/install/x86_64-w64-mingw32/ccache
key: ccache
- name: setup_cmake
run: |
cmake -Bbuild -G Ninja
shell: alpine.sh {0}
- name: run_update
run: |
ninja -C build update
shell: alpine.sh {0}
- name: run_build
run: |
ninja -C build llvm
ninja -C build quake2pro
ninja -C build quake3e
ninja -C build quake3e-openarena
ninja -C build quake3e-urbanterror
ninja -C build xonotic
ninja -C build ffmpeg
ninja -C build mpv
shell: alpine.sh {0}
- name: clear_cache
uses: easimon/wipe-cache@main
- name: save_cache_ltocache
uses: actions/cache/save@main
with:
path: build/install/x86_64-w64-mingw32/ltocache
key: ltocache
- name: save_cache_ccache
uses: actions/cache/save@main
with:
path: build/install/x86_64-w64-mingw32/ccache
key: ccache
- name: run_clean_lto-ccache_cache
run: |
bash -c "rm -rf build/install/x86_64-w64-mingw32/ltocache"
bash -c "rm -rf build/install/x86_64-w64-mingw32/ccache"
shell: alpine.sh {0}
- name: save_cache_build
uses: actions/cache/save@main
with:
path: build
key: cached_build
- name: run_pkg
run: |
sh run.sh package
sh run.sh archive
shell: alpine.sh {0}
- name: gather_logs
if: always()
run: |
mkdir -p logs
cp -fr $(find build -type f -iname "*-out.log") logs/ || true
cp -fr $(find build -type f -iname "*-err.log") logs/ || true
shell: alpine.sh {0}
- name: upload_logs
uses: actions/upload-artifact@master
if: always()
with:
name: build-logs
path: logs/
- name: upload_pkg_artifacts
uses: actions/upload-artifact@master
with:
name: pkg-artifacts
path: bin/*-package
- name: create_release_tag
uses: shxrklol/action-auto-releases-n20@v1.1
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: "latest"
prerelease: false
title: Latest Build
- name: upload_packages
uses: svenstaro/upload-release-action@2.9.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: bin/*.7z
tag: latest
overwrite: true
file_glob: true