diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68f1797b7c..195fffc730 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,49 +10,27 @@ on: name: CI -env: - CI_CARGO_MAKE_VERSION: 0.36.10 - jobs: test: strategy: matrix: os: [ ubuntu-latest, windows-latest, macos-latest ] - rust: [ "1.65.0", "stable" ] - include: - - os: ubuntu-latest - triple: x86_64-unknown-linux-musl - - os: windows-latest - triple: x86_64-pc-windows-msvc - - os: macos-latest - triple: x86_64-apple-darwin + toolchain: [ "1.65.0", "stable" ] runs-on: ${{ matrix.os }} steps: - - uses: hecrj/setup-rust-action@50a120e4d34903c2c1383dec0e9b1d349a9cc2b1 + - uses: actions/checkout@v3 + - name: Install Rust + uses: dtolnay/rust-toolchain@master with: - rust-version: ${{ matrix.rust }} + toolchain: ${{ matrix.toolchain }} components: rustfmt,clippy - - uses: actions/checkout@v3 - - name: Install cargo-make on Linux or macOS - if: ${{ runner.os != 'windows' }} - shell: bash - run: | - curl -LO 'https://github.com/sagiegurari/cargo-make/releases/download/${{ env.CI_CARGO_MAKE_VERSION }}/cargo-make-v${{ env.CI_CARGO_MAKE_VERSION }}-${{ matrix.triple }}.zip' - unzip 'cargo-make-v${{ env.CI_CARGO_MAKE_VERSION }}-${{ matrix.triple }}.zip' - cp 'cargo-make-v${{ env.CI_CARGO_MAKE_VERSION }}-${{ matrix.triple }}/cargo-make' ~/.cargo/bin/ - cargo make --version - - name: Install cargo-make on Windows - if: ${{ runner.os == 'windows' }} - shell: bash + - name: Install cargo-binstall + uses: taiki-e/install-action@cargo-binstall + - name: Install cargo-make run: | - # `cargo-make-v0.35.16-{target}/` directory is created on Linux and macOS, but it is not creatd on Windows. - mkdir cargo-make-temporary - cd cargo-make-temporary - curl -LO 'https://github.com/sagiegurari/cargo-make/releases/download/${{ env.CI_CARGO_MAKE_VERSION }}/cargo-make-v${{ env.CI_CARGO_MAKE_VERSION }}-${{ matrix.triple }}.zip' - unzip 'cargo-make-v${{ env.CI_CARGO_MAKE_VERSION }}-${{ matrix.triple }}.zip' - cp cargo-make.exe ~/.cargo/bin/ - cd .. + cargo binstall -y cargo-make cargo make --version + cargo make --list-all-steps - name: "Format / Build / Test" run: cargo make ci env: @@ -83,14 +61,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Install stable + - name: Install Rust uses: dtolnay/rust-toolchain@stable with: components: llvm-tools - name: cargo install cargo-llvm-cov - # Cargo subcommand to easily use LLVM source-based code coverage. - # see https://github.com/taiki-e/cargo-llvm-cov - # and https://github.com/taiki-e/install-action uses: taiki-e/install-action@cargo-llvm-cov - name: cargo llvm-cov run: cargo llvm-cov --all-features --lcov --output-path lcov.info