-
Notifications
You must be signed in to change notification settings - Fork 2
94 lines (81 loc) · 2.46 KB
/
build-on-push.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
name: Build on Push
# Workflow is triggered when a push is made to ANY branch or on pull request open/reopen!
on:
push:
pull_request:
types: [opened, reopened]
jobs:
build_main:
name: Build for ${{ matrix.os_short }} (${{ matrix.type }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-latest
- windows-latest
type: [ optimized, debug ]
include:
- os: ubuntu-latest
os_short: linux-latest
binary_ext: so
debug_ext: dbg
cc: clang-14
cxx: clang++-14
- os: ubuntu-20.04
os_short: linux-old
binary_ext: so
debug_ext: dbg
cc: clang-9
cxx: clang++-9
- os: windows-latest
os_short: windows-latest
binary_ext: dll
debug_ext: pdb
cc: not-used
cxx: not-used
- type: optimized
ambuild_params: "--enable-optimize --symbol-files"
- type: debug
ambuild_params: "--enable-debug"
steps:
- name: Install (Linux)
if: runner.os == 'Linux'
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y ${{ matrix.cc }} ${{ matrix.cxx }} g++-multilib
echo "CC=${{ matrix.cc }}" >> $GITHUB_ENV
echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV
- name: Setup MSBuild (Windows)
if: runner.os == 'Windows'
uses: microsoft/[email protected]
- name: Setup Python
uses: actions/[email protected]
with:
python-version: '3.11'
- name: Setup ambuild
run: |
python -m pip install wheel
pip install git+https://github.com/alliedmodders/ambuild
- name: Fetch Evobot MM
uses: actions/[email protected]
with:
path: evobot_mm
- name: Build Files
working-directory: evobot_mm
run: |
mkdir build
cd build
python3 ../configure.py ${{ matrix.ambuild_params }}
ambuild
- uses: benjlevesque/[email protected]
id: short-sha
- name: Upload Build Artifacts
uses: actions/[email protected]
with:
name: evobot_mm-${{ matrix.os_short }}-${{ matrix.type }}-${{ steps.short-sha.outputs.sha }}
path: |
evobot_mm/build/**/*.${{ matrix.binary_ext }}
evobot_mm/build/**/*.${{ matrix.debug_ext }}