-
Notifications
You must be signed in to change notification settings - Fork 5
78 lines (69 loc) · 2.1 KB
/
Copy pathbuildtools.yml
File metadata and controls
78 lines (69 loc) · 2.1 KB
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
name: USBSID-Pico Build Tools
env:
BUILD_THREADS: 4
BUILD_TYPE: Release
on:
push:
paths:
- "src/examples/config-tool/**"
- "src/examples/send_sid/**"
- ".github/workflows/buildtools.yml"
# Only run on dev branch
branches: [dev]
# Allows you to run this workflow manually from the Actions tab when needed
workflow_dispatch:
jobs:
build-tools:
name: Build config-tool and send_sid
runs-on: ${{ matrix.os }}
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
strategy:
matrix:
os: [ubuntu-latest, windows-2022]
include:
- {
buildname: cfg_tool,
directory: config-tool,
}
- {
buildname: send_sid,
directory: send_sid,
}
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
path: master
- name: Install dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y pkg-config cmake build-essential libusb-1.0-0 libusb-1.0-0-dev
- name: Set up MSYS2 (Windows)
if: matrix.os == 'windows-2022'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-libusb
mingw-w64-x86_64-cmake
mingw-w64-x86_64-pkg-config
mingw-w64-x86_64-ninja
# Unified Build Step
- name: Configure and Build
shell: ${{ matrix.os == 'windows-2022' && 'msys2 {0}' || 'bash' }}
run: |
pushd master/examples/${{ matrix.directory }}
cmake -S . -B build && cmake --build build -j$(nproc)
popd
- name: Upload
uses: actions/upload-artifact@v4
with:
name: binary-${{ matrix.os }}
path: |
master/examples/${{ matrix.directory }}/${{ matrix.buildname }}
master/examples/${{ matrix.directory }}/${{ matrix.buildname }}.exe