Ci fixes #114
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: shellcheck the CI and `contrib` scripts | |
| if: "matrix.platform == 'ubuntu-latest'" | |
| run: | | |
| shellcheck ci/*.sh -aP ci | |
| shellcheck contrib/*.sh -aP contrib | |
| - name: Run CI script | |
| shell: bash # Default on Winblows is powershell | |
| run: CI_ENV=1 CI_MINIMIZE_DISK_USAGE=1 ./ci/ci-tests.sh | |
| 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 |