-
-
Notifications
You must be signed in to change notification settings - Fork 113
86 lines (73 loc) · 2.46 KB
/
continuous_integration.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
name: Continuous Integration
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
defaults:
run:
shell: ${{ matrix.config.shell }}
strategy:
fail-fast: false
matrix:
config:
- name: "macOS arm64"
os: macos-latest
release: true
shell: bash
package_name: "mac_arm64"
artifact-path: build/*.dmg
- name: "macOS x64"
os: macos-13
release: true
shell: bash
package_name: "mac_x64"
artifact-path: build/*.dmg
- name: "Linux GCC"
os: ubuntu-24.04
shell: bash
- name: "Linux Clang"
os: ubuntu-24.04
shell: bash
extra_options: "-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
steps:
- uses: actions/checkout@v2
- name: Install Dependencies (macOS)
if: runner.os == 'macOS'
run: brew install fluidsynth freeimage ftgl lua mpg123 sfml wxwidgets dylibbundler create-dmg
- name: Install Dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install \
libfluidsynth-dev libfreeimage-dev libwebkit2gtk-4.1-dev \
libftgl-dev liblua5.3-dev libmpg123-dev libsfml-dev \
libwxgtk3.2-dev libwxgtk-webview3.2-dev
- name: Configure
run: |
mkdir build
cmake -B build ${{ matrix.config.extra_options }} .
- name: Build
run: |
export MAKEFLAGS=--keep-going
cmake --build build --parallel 3
- name: Package (macOS)
if: runner.os == 'macOS'
run: |
cd build
dylibbundler -od -b -x slade.app/Contents/MacOS/slade -d slade.app/Contents/MacOS/libs -p @executable_path/libs
create-dmg --app-drop-link 10 10 ./slade_${{ matrix.config.package_name }}_${{ github.ref_name }}.dmg ./slade.app
- name: Upload Artifacts
if: ${{ matrix.config.package_name }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.config.package_name }}
path: ${{ matrix.config.artifact-path }}
- name: Release
if: ${{ contains(github.ref, 'tags') && matrix.config.release }}
uses: ncipollo/release-action@v1
with:
name: ${{ github.ref_name }}
allowUpdates: true
artifacts: ${{ matrix.config.artifact-path }}