chore: clean up #146
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |