Flashtestations flag (#165) #368
This file contains hidden or 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: Checks | |
on: | |
workflow_dispatch: | |
pull_request: | |
merge_group: | |
push: | |
branches: [main] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
lint_and_test: | |
name: Lint and test | |
runs-on: warp-ubuntu-latest-x64-32x | |
env: | |
# Set features for the Makefile | |
FEATURES: ${{ matrix.features }} | |
strategy: | |
matrix: | |
toolchain: | |
- nightly | |
features: | |
- "" | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
# https://github.com/dtolnay/rust-toolchain | |
- name: Setup rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
components: "rustfmt,clippy" | |
# https://github.com/swatinem/rust-cache | |
- name: Run Swatinem/rust-cache@v2 | |
if: ${{ !env.ACT }} | |
uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
# https://github.com/Mozilla-Actions/sccache-action | |
- name: Run sccache-action | |
if: ${{ !env.ACT }} | |
uses: mozilla-actions/sccache-action@v0.0.9 | |
- name: Set sccache env vars | |
if: ${{ !env.ACT }} | |
run: | | |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV | |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | |
- name: Install Foundry toolchain | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Install native dependencies | |
run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev clang libclang-dev llvm build-essential pkg-config libtss2-dev | |
- name: Compile tester | |
run: make tester | |
- name: Compile op-rbuilder | |
run: cargo build -p op-rbuilder --bin op-rbuilder | |
- name: Lint | |
run: make lint | |
- name: Test | |
run: make test | |
env: | |
TESTS_TEMP_DIR: ${{ github.workspace }} |