-
Notifications
You must be signed in to change notification settings - Fork 5
80 lines (72 loc) · 2.35 KB
/
Copy pathbuildtools.yml
File metadata and controls
80 lines (72 loc) · 2.35 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
79
80
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
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest, shell: bash,
directory: config-tool, buildname: cfg_tool }
- { os: ubuntu-latest, shell: bash,
directory: send_sid, buildname: send_sid }
- { os: windows-2022, shell: 'msys2 {0}',
directory: config-tool, buildname: cfg_tool }
- { os: windows-2022, shell: 'msys2 {0}',
directory: config-tool, buildname: cfg_tool }
defaults:
run:
shell: ${{ matrix.shell }}
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
- name: Configure and build ${{ matrix.buildname }}
run: |
pushd master/examples/${{ matrix.directory }}
cmake -S . -B build && cmake --build build -j$(nproc)
pwd
ls -lhai
popd
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.buildname }}-${{ matrix.os }}
path: |
master/examples/${{ matrix.directory }}/${{ matrix.buildname }}
master/examples/${{ matrix.directory }}/${{ matrix.buildname }}.exe
if-no-files-found: ignore