-
-
Notifications
You must be signed in to change notification settings - Fork 10
62 lines (59 loc) · 1.92 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
name: Build on push
on:
push:
branches:
- main
jobs:
build-dummy:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Build the dummy
working-directory: dummy-service
run: gcc -o GalaxyCommunication.exe main.c -ladvapi32
- uses: actions/upload-artifact@v4
with:
name: dummy-GalaxyCommunication.exe
path: dummy-service/GalaxyCommunication.exe
build:
strategy:
matrix:
target:
[
x86_64-unknown-linux-gnu,
aarch64-unknown-linux-gnu,
x86_64-apple-darwin,
aarch64-apple-darwin,
x86_64-pc-windows-msvc,
aarch64-pc-windows-msvc,
]
runs-on: ${{ (contains(matrix.target, 'apple-darwin') && 'macos-latest') ||
(contains(matrix.target, 'linux-gnu') && 'ubuntu-latest') ||
(contains(matrix.target, 'pc-windows') && 'windows-latest') }}
needs: build-dummy
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
name: Install arm gcc
run: sudo apt install gcc-aarch64-linux-gnu
- name: Setup target
run: rustup target add ${{ matrix.target }}
- name: Build
run: cargo build --verbose --release --target ${{ matrix.target }}
- name: Downloading dummy service for packaging
uses: actions/download-artifact@v4
with:
name: dummy-GalaxyCommunication.exe
path: dummy-service
- name: Generic packaging
uses: actions/upload-artifact@v4
with:
name: comet-${{ matrix.target }}
path: |
target/${{ matrix.target }}/release/comet*
!target/${{ matrix.target }}/release/comet.d
dummy-service/
!dummy-service/*.c
${{ contains(matrix.target, 'linux-gnu') && 'docs/steamdeck' }}