-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (43 loc) · 2.14 KB
/
build-linux-windows.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
name: Build soundpipe for Linux & Windows
run-name: ${{ github.actor }} is building soundpipe
on:
push:
branches:
- master
workflow_call:
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create output directory variable
id: buildoutput
run: echo "build-output-dir=${{ github.workspace }}/OutputFiles" >> "$GITHUB_OUTPUT"
- name: Make output directory
run: mkdir ${{ steps.buildoutput.outputs.build-output-dir }}
- name: Make runtimes directory for windows/linux
run: mkdir ${{ steps.buildoutput.outputs.build-output-dir }}/runtimes
- name: Install MinGW
run: sudo apt install -y mingw-w64
- name: Build for Linux
run: bash make_linux_shared.sh
- name: Move Linux library to output
run: |
mkdir ${{ steps.buildoutput.outputs.build-output-dir }}/runtimes/linux-x64
mkdir ${{ steps.buildoutput.outputs.build-output-dir }}/runtimes/linux-x64/native
mv libsoundpipe.so ${{ steps.buildoutput.outputs.build-output-dir }}/runtimes/linux-x64/native
- name: Clean up Linux build
run: make clean
- name: Build for Windows
run: bash make_windows_shared.sh
- name: Move Windows library to output
run: |
mkdir ${{ steps.buildoutput.outputs.build-output-dir }}/runtimes/win-x64
mkdir ${{ steps.buildoutput.outputs.build-output-dir }}/runtimes/win-x64/native
mv libsoundpipe.dll ${{ steps.buildoutput.outputs.build-output-dir }}/runtimes/win-x64/native
- name: Pack it with a big red ribbon
uses: actions/upload-artifact@v4
with:
name: SoundPipe-Windows-Linux
path: ${{ steps.buildoutput.outputs.build-output-dir }}