Skip to content

Commit 54bce0a

Browse files
committed
ci: add build artifacts for ard-tools
1 parent 0748abd commit 54bce0a

1 file changed

Lines changed: 96 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Test & Package
2+
3+
on:
4+
push:
5+
branches: [master, "feature/xcxde"]
6+
tags: ["*.*.*"]
7+
pull_request:
8+
9+
jobs:
10+
clippy:
11+
name: Check/Clippy
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v1
16+
17+
- name: Install rust
18+
uses: actions-rs/toolchain@v1
19+
with:
20+
toolchain: stable
21+
components: clippy
22+
profile: minimal
23+
override: true
24+
25+
- name: Run clippy
26+
uses: actions-rs/clippy-check@v1
27+
with:
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
args: --all-features
30+
31+
test:
32+
name: Run tests
33+
needs: [clippy]
34+
runs-on: ubuntu-latest
35+
strategy:
36+
matrix:
37+
build: [stable, beta]
38+
include:
39+
- build: beta
40+
rust: beta
41+
steps:
42+
- name: Checkout
43+
uses: actions/checkout@v1
44+
45+
- name: Install rust
46+
uses: actions-rs/toolchain@v1
47+
with:
48+
toolchain: ${{ matrix.rust || 'stable' }}
49+
profile: minimal
50+
override: true
51+
52+
- name: Test API
53+
uses: actions-rs/cargo@v1
54+
with:
55+
command: test
56+
args: --all-features
57+
58+
- name: Test toolset
59+
run: cd toolset && cargo test --all-features
60+
61+
build-toolset:
62+
name: Build & package toolset
63+
needs: [test]
64+
if: github.ref == 'refs/heads/master'
65+
runs-on: ${{ matrix.builds.os }}
66+
strategy:
67+
matrix:
68+
builds:
69+
- os: ubuntu-latest
70+
file: linux-x86_64-glibc
71+
out: ard-tools
72+
target: x86_64-unknown-linux-gnu
73+
- os: ubuntu-latest
74+
file: linux-x86_64-musl
75+
out: ard-tools
76+
target: x86_64-unknown-linux-musl
77+
- os: windows-2019
78+
file: win64.exe
79+
out: ard-tools.exe
80+
target: x86_64-pc-windows-msvc
81+
steps:
82+
- name: Checkout
83+
uses: actions/checkout@v2
84+
- name: Install Rust
85+
uses: actions-rs/toolchain@v1
86+
with:
87+
toolchain: stable
88+
target: ${{ matrix.builds.target }}
89+
- name: Build
90+
run: cd toolset && cargo build --release --target ${{ matrix.builds.target }}
91+
- name: Upload executable
92+
uses: actions/upload-artifact@v4
93+
with:
94+
name: ard-tools-${{ matrix.builds.file }}
95+
path: target/${{ matrix.builds.target }}/release/${{ matrix.builds.out }}
96+

0 commit comments

Comments
 (0)