forked from bachingo/TF2Vintage
-
Notifications
You must be signed in to change notification settings - Fork 11
62 lines (49 loc) · 1.57 KB
/
linux.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
name: Linux
on:
workflow_call:
env:
CCACHE_VERSION: 3.7.7
CCACHE_DIR: ${{ github.workspace }}/src/ccache
jobs:
build:
runs-on:
ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- id: get-date
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
- uses: actions/cache@v3
id: cache
with:
path: |
${{ env.CCACHE_DIR }}
key: ${{ runner.os }}-${{ steps.get-date.outputs.date }}
restore-keys: ${{ runner.os }}-
- name: Setup ccache
run: |
sudo mkdir -p game/tf2vintage/bin
cd src
sudo mkdir -p ./ccache/tmp
cd devtools/bin/linux
sudo ./ccache --set-config cache_dir=$CCACHE_DIR
sudo ./ccache --set-config compression_level=6
- name: Restore cache
if: steps.cache.outputs.cache-hit == 'true'
run: sudo bash .github/gh-cache.sh restore
- name: Configure dependencies
run: sudo apt update && sudo apt install -y zip build-essential gcc-multilib g++-multilib
- name: Create project
run: cd src && sudo devtools/bin/vpc /tf2vintage +game /mksln TF2vintage
- name: Build project
run: cd src && sudo make -f TF2vintage.mak
- name: Upload product
uses: actions/upload-artifact@v3
with:
name: tf2vintage-linux
path: game/tf2vintage/bin/
- name: Move to cache
run: sudo bash .github/gh-cache.sh