-
Notifications
You must be signed in to change notification settings - Fork 1
88 lines (72 loc) · 2.26 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
name: Continuous Integration
on: [push, pull_request, workflow_dispatch]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
defaults:
run:
shell: ${{ matrix.config.shell }}
strategy:
fail-fast: false
matrix:
config:
- name: Linux (libsixel)
os: ubuntu-latest
shell: bash
suffix: ""
sixel: true
- name: Linux (no libsixel)
os: ubuntu-latest
shell: bash
suffix: ""
sixel: false
- name: macOS arm64
os: macos-13
shell: bash
suffix: "-macos-x86_64"
sixel: true
- name: macOS x86-64
os: macos-latest
shell: bash
suffix: "-macos-arm64"
sixel: true
steps:
- name: Install build dependencies (Homebrew, macOS)
if: runner.os == 'macOS'
run: brew install -q libsndfile ncurses libpng pandoc
- name: Install build dependencies (apt, Linux)
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt -q install libsndfile1-dev libncurses-dev libpng-dev \
gcc pkg-config
- name: Install libsixel (Homebrew, macOS)
if: runner.os == 'macOS' && matrix.config.sixel
run: brew install -q libsixel
- name: Install libsixel (apt, Linux)
if: runner.os == 'Linux' && matrix.config.sixel
run: sudo apt -q install libsixel-dev
- uses: actions/checkout@v4
- name: Find Git version
id: version
run: |
if git describe --exact-match --tags >/dev/null; then
VERSION=$(git describe --exact-match --tags)
VERSION=${VERSION/#wadgadget-/}
else
VERSION=$(git rev-parse --short HEAD)
fi
VERSION=$VERSION${{ matrix.config.suffix }}
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: make
run: make -C src -j8
- name: Build package (macOS)
if: runner.os == 'macOS'
run: make -C pkg/macos
- name: Upload build (macOS)
if: runner.os == 'macOS'
uses: actions/upload-artifact@v4
with:
path: "pkg/macos/wadgadget.dmg"
name: wadgadget-${{steps.version.outputs.VERSION}}