-
-
Notifications
You must be signed in to change notification settings - Fork 7
52 lines (52 loc) · 1.43 KB
/
ci.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
name: CI
on:
push:
branches-ignore:
- dependabot/**
pull_request:
defaults:
run:
shell: bash
concurrency:
group: CI-${{ github.ref }}
# Queue on all branches and tags, but only cancel overlapping PR burns.
cancel-in-progress: ${{ github.ref != 'refs/heads/main' || !startsWith(github.ref, 'refs/tags/') }}
jobs:
org-check:
name: Check GitHub Organization
if: github.repository_owner == 'a-scie'
runs-on: ubuntu-20.04
steps:
- name: Noop
run: "true"
ci:
name: (${{ matrix.os }}) CI
needs: org-check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-11, macos-13-aarch64, windows-2022]
steps:
- uses: actions/checkout@v3
- name: Check Formatting
run: |
rustup toolchain add nightly -c rustfmt
cargo +nightly fmt --check --all
- name: Lint
run: cargo clippy --all
- name: Unit Tests
run: cargo test --all
- name: Build & Package
if: ${{ matrix.os != 'ubuntu-20.04' }}
run: cargo run -p package
- name: Build & Package
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: |
mkdir dist
docker run --rm \
-v $PWD:/code \
-w /code \
rust:1.70.0-alpine3.18 \
sh -c 'apk add musl-dev && cargo run -p package'
- name: Integration Tests
run: examples/run.sh --no-package