diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..37f7de6 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,6 @@ +[build] +target-dir = ".build" + +[profile.test-cover] +inherits = "test" +incremental = false diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 0a3c646..262b57f 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -6,6 +6,10 @@ on: # yamllint disable-line rule:truthy - "master" pull_request: {} +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: CARGO_INCREMENTAL: 0 SCCACHE_GHA_ENABLED: "true" @@ -17,23 +21,23 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repo and build scripts - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: Run sccache - uses: mozilla-actions/sccache-action@v0.0.3 + uses: mozilla-actions/sccache-action@v0.0.7 - name: Build - run: cargo build + run: make build lint: runs-on: ubuntu-latest steps: - name: Check out repo and build scripts - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: Run sccache - uses: mozilla-actions/sccache-action@v0.0.3 + uses: mozilla-actions/sccache-action@v0.0.7 - name: rustfmt nightly run: | rustup toolchain install nightly-x86_64-unknown-linux-gnu @@ -41,20 +45,30 @@ jobs: - name: Install Python uses: actions/setup-python@v5 with: - python-version: "3.11" - - name: Install poetry - uses: snok/install-poetry@v1 + python-version: "3.13" + - name: Install pre-commit + run: pip install pre-commit - name: Run pre-commit - uses: pre-commit/action@v3.0.1 + run: make lint test: runs-on: ubuntu-latest steps: - name: Check out repo and build scripts - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: Run sccache - uses: mozilla-actions/sccache-action@v0.0.3 + uses: mozilla-actions/sccache-action@v0.0.7 + - name: Install grcov + run: cargo install grcov + - name: Add llvm-tools + run: rustup component add llvm-tools-preview - name: Test - run: cargo test + run: make test + - name: Compute coverage + run: make cover + - name: Upload coverage + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index ea8c4bf..24e5b0a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/target +.build diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..5cbd2b2 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "build"] + path = build + url = git@github.com:acrlabs/build-scripts diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e51f0a3 --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +include build/base.mk +include build/rust.mk diff --git a/build b/build new file mode 160000 index 0000000..19476ee --- /dev/null +++ b/build @@ -0,0 +1 @@ +Subproject commit 19476ee13253470a8406890c4d42835bfde2f5f1