-
Notifications
You must be signed in to change notification settings - Fork 3
67 lines (56 loc) · 1.62 KB
/
build_cli.yaml
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
# Test and build the project.
---
name: Build cli
on:
# Allow manual trigger
workflow_dispatch:
# Run on every pull request
pull_request:
branches: ["*"]
# Run on every push to main
push:
branches: ["main", "tauri-main"]
jobs:
build:
name: Create binary for ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest-8-cores
target: x86_64-unknown-linux-gnu
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Install dependencies (Linux)
if: matrix.os == 'ubuntu-latest-8-cores'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy
rustflags: "" # Do not fail on warnings, so reset the default value to empty
- uses: giraffate/clippy-action@v1
with:
reporter: github-pr-check
filter_mode: nofilter
fail_on_error: true
clippy_flags: --all-features --no-deps
- name: cargo test
run: cargo test
- name: cargo build
run: cargo build --release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: fpx_${{ matrix.target }}
path: target/release/fpx-cli
if-no-files-found: error
retention-days: 7