-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (67 loc) · 1.97 KB
/
build-on-push.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
name: build-on-push
on: [push]
jobs:
build-windows:
runs-on: windows-latest
strategy:
matrix:
build-mode: [debug, release]
steps:
- name: Checkout
uses: actions/[email protected]
with:
submodules: true
- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
components: rustfmt, clippy
- name: Rust cache
uses: Swatinem/[email protected]
- name: Clippy checks
if: matrix.build-mode == 'debug'
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Rustfmt checks
if: matrix.build-mode == 'debug'
run: cargo fmt --all -- --check
- name: Cargo test
if: matrix.build-mode == 'debug'
run: cargo test --all-targets --all-features
- name: Build debug
if: matrix.build-mode == 'debug'
run: cargo build
- name: Build release
if: matrix.build-mode == 'release'
run: cargo build --release
- name: Get built artifacts
uses: actions/[email protected]
with:
name: noodles-windows-${{ matrix.build-mode }}
path: target/${{ matrix.build-mode }}/noodles*
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
build-mode: [debug, release]
steps:
- name: Checkout
uses: actions/[email protected]
with:
submodules: true
- name: Install Nix
uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Rust cache
uses: Swatinem/[email protected]
- name: Build debug
if: matrix.build-mode == 'debug'
run: nix develop -c -- cargo build
- name: Build release
if: matrix.build-mode == 'release'
run: nix develop -c -- cargo build --release
- name: Get built artifacts
uses: actions/[email protected]
with:
name: noodles-unix-${{ matrix.build-mode }}
path: target/${{ matrix.build-mode }}/noodles*