Skip to content

GHA pipeline rewrite for ease and speed #79

GHA pipeline rewrite for ease and speed

GHA pipeline rewrite for ease and speed #79

Workflow file for this run

on:
# push:
# branches: [main, 'release-v**']
pull_request:
paths:
- 'src/'
- '.github/workflows/sanity-checks.yml'
name: Sanity checks
concurrency:
group: 'tests-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
permissions:
id-token: write
contents: read
jobs:
test-n-lint:
name: ${{ matrix.target }}
runs-on: ubuntu-latest-4-cores
strategy:
matrix:
target: [test-general, test-integration,
lint-fmt, lint-clippy, cargo-build] # ,lint-taplo]
steps:
- name: Check out code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #3.5.2
- name: Prep build
uses: ./.github/actions/prep-ubuntu
with:
# RUST_TOOLCHAIN: "nightly-2023-02-07"
cache: enabled
# Cache needs Google credentials:
GWIP: ${{ secrets.GWIP_SCCACHE }}
GSA: ${{ secrets.GSA_SCCACHE }}
# Tarpaulin requires cargo 1.70.0:
# - name: generate codecov reports
# run: |
# if ${{ contains(matrix.target, 'test' ) }}; then
# echo "---- GENERATE CODE COVERAGE ----"
# echo "# Install Tarpaulin"
# cargo install --locked cargo-tarpaulin
# # make Cargo.toml
# echo "Generate code coverage for ${{ matrix.target }}"
# cargo +nightly tarpaulin --verbose --no-fail-fast --workspace --timeout 300 --out Xml
# fi
- name: Runing cargo ${{ matrix.target }}
run: ./ci/run-check.sh
env:
TARGET: ${{ matrix.target }}
RUSTC_WRAPPER: "sccache"
# UPLOAD REPORTS (requires cargo 1.70.0)
# - name: Upload codecov report
# uses: codecov/codecov-action@v3
# with:
# # token: ${{ secrets.CODECOV_TOKEN }}
# # files: ./coverage1.xml,./coverage2.xml # optional
# # flags: unittests # optional
# # name: codecov-umbrella # optional
# # fail_ci_if_error: true # optional (default = false)
# verbose: true # optional (default = false)
benchmark-check:
name: bench-check-${{ matrix.runtime }}
runs-on: ubuntu-latest #r-4-cores
strategy:
matrix:
runtime: [development, altair, centrifuge]
steps:
- name: Check out code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #3.5.2
- name: Prep build
uses: ./.github/actions/prep-ubuntu
with:
# RUST_TOOLCHAIN: "nightly-2022-11-14"
cache: enabled
GWIP: ${{ secrets.GWIP_SCCACHE }}
GSA: ${{ secrets.GSA_SCCACHE }}
- name: Runing cargo ${{ matrix.target }}
run: ./ci/run-check.sh
env:
TARGET: benchmark-check
RUNTIME: ${{ matrix.runtime }}
RUSTC_WRAPPER: "sccache"