Enforce compile time checks in FinalTransaction builder
#170
Workflow file for this run
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: Fixtures | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| - dev | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: full | |
| jobs: | |
| simplex-tests: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| toolchain: [ "1.91.0", "stable" ] | |
| build-dir: [ "fixtures" ] | |
| owner_repo: [ "BlockstreamResearch/smplx" ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| submodules: true | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ matrix.toolchain }} | |
| - name: Use Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Resolve commit SHA | |
| id: commit | |
| shell: bash | |
| run: | | |
| if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
| echo "sha=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "sha=${{ github.sha }}" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Install simplex-cli | |
| uses: ./.github/actions/setup | |
| with: | |
| commit-sha: ${{ steps.commit.outputs.sha }} | |
| owner-repo: ${{ matrix.owner_repo }} | |
| - name: Generate contract artifacts | |
| shell: bash | |
| run: | | |
| cd ${{ matrix.build-dir }} | |
| simplex build | |
| test -f src/artifacts/mod.rs | |
| - name: Build | |
| run: | | |
| cd ${{ matrix.build-dir }} | |
| cargo build --workspace --all-features --verbose | |
| - name: Test | |
| run: | | |
| cd ${{ matrix.build-dir }} | |
| simplex test -v | |
| lint-checks: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| build-dir: [ "fixtures" ] | |
| owner_repo: [ "BlockstreamResearch/smplx" ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| submodules: true | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| components: rustfmt | |
| - name: Use Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install cargo-hack | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-hack | |
| - name: Resolve commit SHA | |
| id: commit | |
| shell: bash | |
| run: | | |
| if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
| echo "sha=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "sha=${{ github.sha }}" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Install simplex-cli | |
| uses: ./.github/actions/setup | |
| with: | |
| commit-sha: ${{ steps.commit.outputs.sha }} | |
| owner-repo: ${{ matrix.owner_repo }} | |
| - name: Generate contract artifacts | |
| shell: bash | |
| run: | | |
| cd ${{ matrix.build-dir }} | |
| simplex build | |
| test -f src/artifacts/mod.rs | |
| - name: Check formatting | |
| run: | | |
| cd ${{ matrix.build-dir }} | |
| cargo fmt --all --check | |
| - name: Check hack | |
| run: | | |
| cd ${{ matrix.build-dir }} | |
| cargo hack check | |
| - name: Run clippy checks | |
| run: | | |
| cd ${{ matrix.build-dir }} | |
| cargo clippy --workspace --all-targets --all-features | |
| env: | |
| RUSTFLAGS: -Dwarnings |