-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (49 loc) · 1.44 KB
/
actions.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
name: build
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUST_MIN_STACK: 16777212
permissions: {}
jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
include:
- platform: ubuntu-latest
artifact-path: target/release/bp
artifact-platform-name: linux-x86_64-gnu
env-command: ">> $GITHUB_ENV"
- platform: macos-latest
artifact-path: target/release/bp
artifact-platform-name: macos-x86_64
env-command: ">> $GITHUB_ENV"
- platform: windows-latest
artifact-path: target/release/bp.exe
artifact-platform-name: windows-x86_64
env-command: "| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append"
runs-on: ${{ matrix.platform }}
timeout-minutes: 10
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Update Rust
run: rustup update
- name: rustfmt
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: |
cargo fmt -- --check
- name: Build
run: |
cargo build --release
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: bp-${{ matrix.artifact-platform-name }}
path: ${{ matrix.artifact-path }}
if-no-files-found: error