-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (87 loc) · 2.59 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
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 clang18 llvm18 llvm18-linker-tools lld cmake coreutils diffutils g++ gawk gcc 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: load_cache
uses: actions/cache/restore@main
with:
path: build
key: cached_build
- 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 ffmpeg
ninja -C build mpv
shell: alpine.sh {0}
- name: clear_cache
uses: easimon/wipe-cache@main
- name: save_cache
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