-
Notifications
You must be signed in to change notification settings - Fork 19
71 lines (58 loc) · 1.99 KB
/
main.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
name: rusty-psn Builds
on:
- push
- pull_request
jobs:
build_matrix:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
feature: ["cli", "egui"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Rust Cache
uses: Swatinem/[email protected]
with:
key: ${{ matrix.feature }}-${{ matrix.os }}
cache-on-failure: "true"
- name: Install dependencies
if: ${{ matrix.os == 'ubuntu-latest' && matrix.feature == 'egui' }}
run: |
sudo apt update
sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev libgtk-3-dev
- name: Build rusty-psn
run: cargo build --release --no-default-features --features ${{ matrix.feature }}
- name: Move binary (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
mkdir result
cp target/release/rusty-psn result
- name: Move binary (MacOS)
if: ${{ matrix.os == 'macos-latest' }}
run: |
mkdir result
cp target/release/rusty-psn result
- name: Move binary (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
mkdir result
cp target/release/rusty-psn.exe result
- name: Upload artifact (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v4
with:
name: rusty-psn-${{ matrix.feature }}-linux
path: result
- name: Upload artifact (MacOS)
if: ${{ matrix.os == 'macos-latest' }}
uses: actions/upload-artifact@v4
with:
name: rusty-psn-${{ matrix.feature }}-macos
path: result
- name: Upload artifact (Windows)
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/upload-artifact@v4
with:
name: rusty-psn-${{ matrix.feature }}-windows
path: result