-
Notifications
You must be signed in to change notification settings - Fork 4
91 lines (77 loc) · 2.46 KB
/
build-linux.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
name: Build Linux
on:
# Allow manual runs
workflow_dispatch:
# Run on any push to `master`
push:
branches:
- master
- devel
# Definitely run on any PR
pull_request:
branches:
- master
- devel
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Check out repository
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set Github SHA Output
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v3
with:
push: false
outputs: type=local,dest=bin
platforms: linux/amd64,linux/arm64
build-args:
BUILDOPTS=-j4
- name: Publish amd64 release executables
uses: actions/upload-artifact@v3
with:
name: amcduke32_${{steps.vars.outputs.sha_short}}_linux_amd64
path: |
bin/linux_amd64/amcsquad
bin/linux_amd64/mapster32
bin/linux_amd64/buildlic.txt
bin/linux_amd64/gpl-2.0.txt
bin/linux_amd64/gamecontrollerdb.txt
- name: Publish amd64 debug executables
uses: actions/upload-artifact@v3
with:
name: amcduke32_${{steps.vars.outputs.sha_short}}_linux_amd64_debug
path: |
bin/linux_amd64/amcsquad.debug
bin/linux_amd64/mapster32.debug
bin/linux_amd64/buildlic.txt
bin/linux_amd64/gpl-2.0.txt
bin/linux_amd64/gamecontrollerdb.txt
- name: Publish arm64 release executables
uses: actions/upload-artifact@v3
with:
name: amcduke32_${{steps.vars.outputs.sha_short}}_linux_arm64
path: |
bin/linux_arm64/amcsquad
bin/linux_arm64/mapster32
bin/linux_arm64/buildlic.txt
bin/linux_arm64/gpl-2.0.txt
bin/linux_arm64/gamecontrollerdb.txt
- name: Publish arm64 debug executables
uses: actions/upload-artifact@v3
with:
name: amcduke32_${{steps.vars.outputs.sha_short}}_linux_arm64_debug
path: |
bin/linux_arm64/amcsquad.debug
bin/linux_arm64/mapster32.debug
bin/linux_arm64/buildlic.txt
bin/linux_arm64/gpl-2.0.txt
bin/linux_arm64/gamecontrollerdb.txt
# TODO: automatically create a GitHub release when a tag is created
# TODO: see about building Windows executables too