From 388d2e0d5739b894ed9e0e82cfd771d710cf4bb3 Mon Sep 17 00:00:00 2001 From: Martin Grigorov Date: Thu, 11 Apr 2024 10:10:22 +0300 Subject: [PATCH] Update Github actions (#227) * Update Github Actions' versions and runners Signed-off-by: Martin Tzvetanov Grigorov * Add a workaround for https://github.com/38/d4-format/pull/77 Signed-off-by: Martin Tzvetanov Grigorov * Use dtolnay/rust-toolchain Github Action to install Rustc/Cargo Signed-off-by: Martin Tzvetanov Grigorov * Do not fail fast the build matrix Signed-off-by: Martin Tzvetanov Grigorov * Build with Nim 1.6.x and 2.x Signed-off-by: Martin Tzvetanov Grigorov --------- Signed-off-by: Martin Tzvetanov Grigorov --- .github/workflows/build.yml | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 33332bd..1d870e7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,42 +2,47 @@ name: Build on: - - push - - pull_request + push: + branches: + - master + pull_request: + branches: + - master jobs: build: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: - os: [ubuntu-18.04, macos-10.15] + os: [ubuntu-20.04, macos-13] version: - - stable - - devel + - 1.6.18 + - 2.0.2 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # Caching - name: Cache choosenim id: cache-choosenim - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.choosenim key: ${{ runner.os }}-choosenim-stable - name: Cache nimble id: cache-nimble - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.nimble key: ${{ runner.os }}-nimble-stable - name: Cache htslib id: cache-htslib - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: $HOME/htslib key: ${{ runner.os }}-htslib-1.10 @@ -71,6 +76,7 @@ jobs: run: | #export HTSLIB=system git clone https://github.com/38/d4-format + echo 'location' >> ~/.curlrc # https://github.com/38/d4-format/pull/77#issuecomment-2044438359 cd d4-format cargo build --release --all-features --package=d4binding sudo cp target/release/libd4binding.* /usr/local/lib @@ -78,15 +84,14 @@ jobs: sudo ldconfig || true - - uses: iffy/install-nim@v4.1.1 + - uses: iffy/install-nim@v5 with: version: ${{ matrix.version }} - - uses: actions-rs/toolchain@v1 + - name: Rust Toolchain + uses: dtolnay/rust-toolchain@nightly with: toolchain: stable - - uses: actions-rs/cargo@v1 - # Build and Test - name: Build test executable @@ -110,7 +115,7 @@ jobs: - name: Upload Artifact if: success() - uses: actions/upload-artifact@v1.0.0 + uses: actions/upload-artifact@v4 with: name: mosdepth_${{ matrix.os }}_executable path: bin/