ci: trim to jobs and toolchains the fork actually changes #121
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: Continuous Integration Checks | |
| on: | |
| push: | |
| branches-ignore: | |
| - master | |
| pull_request: | |
| branches-ignore: | |
| - master | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [ ubuntu-latest, windows-latest, macos-latest ] | |
| toolchain: [ stable, beta ] | |
| exclude: | |
| - platform: windows-latest | |
| toolchain: beta | |
| - platform: macos-latest | |
| toolchain: beta | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust ${{ matrix.toolchain }} toolchain | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ matrix.toolchain }} | |
| - name: Use rust-lld linker on Windows | |
| if: matrix.platform == 'windows-latest' | |
| shell: bash | |
| run: echo "RUSTFLAGS=-C linker=rust-lld" >> "$GITHUB_ENV" | |
| - name: Build the workspace | |
| shell: bash # Default on Winblows is powershell | |
| run: cargo check --workspace --verbose --color always | |
| linting: | |
| runs-on: ubuntu-latest | |
| env: | |
| TOOLCHAIN: stable | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust ${{ env.TOOLCHAIN }} toolchain | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ env.TOOLCHAIN }} | |
| - name: Install clippy | |
| run: | | |
| rustup component add clippy | |
| - name: Run default clippy linting | |
| run: | | |
| ./ci/check-lint.sh | |
| rustfmt: | |
| runs-on: ubuntu-latest | |
| env: | |
| TOOLCHAIN: 1.63.0 | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust ${{ env.TOOLCHAIN }} toolchain | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ env.TOOLCHAIN }} | |
| - name: Install rustfmt | |
| run: | | |
| rustup component add rustfmt | |
| - name: Run rustfmt checks | |
| run: cargo fmt --check | |
| - name: Run rustfmt checks on lightning-tests | |
| run: cd lightning-tests && cargo fmt --check |