-
Notifications
You must be signed in to change notification settings - Fork 3
90 lines (83 loc) · 2.32 KB
/
main.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: CI
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build-main:
strategy:
matrix:
featureset:
- flag: ""
- flag: "--all-features"
- flag: "--no-default-features"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: |
cargo --version
cargo build --verbose ${{ matrix.featureset.flag }}
- name: Test
run: cargo test ${{ matrix.featureset.flag }} --verbose
- name: Check Format
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy --all-targets ${{ matrix.featureset.flag }} -- -D warnings
build-cli:
needs: build-main
runs-on: ubuntu-latest
defaults:
run:
working-directory: cli/
steps:
- uses: actions/checkout@v2
- name: Build
run: |
cargo --version
cargo build --verbose
- name: Test
run: cargo test --verbose
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Check Format
run: cargo fmt -- --check
build-pyo3:
needs: build-main
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Symlink README
run: |
cd pyo3/
ln -s ../README.md ./
- uses: messense/maturin-action@v1
with:
manylinux: auto
command: build
args: --release --sdist -o pyo3/dist --find-interpreter -m pyo3/Cargo.toml
# now Pages.dev do this for us
# build-web:
# needs: build-main
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# with:
# node-version: "16"
# - name: Init web
# working-directory: web/
# run: |
# node --version
# yarn --version
# yarn install
# - name: Build
# working-directory: web/
# run: yarn build
# - name: Test
# working-directory: web/
# run: yarn test # no effective test so far
# adapted from: https://github.com/Gowee/cidr-aggregator/blob/9c02241ab64e5cf62e33375e55e09502385bdc61/.github/workflows/main.yml#L1
# which is in turn adapted from:
# https://github.com/Gowee/json2pyi/blob/4e13b4767f97d79e90ecf19a0cb21b1e799d7d48/.github/workflows/main.yml