From 66a05d57d4b1642bdda5409a62e50caf12722d40 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Mon, 9 Oct 2023 16:41:55 +0900 Subject: [PATCH] ci: Use upload-rust-binary-action (dry-run mode) in build job https://github.com/taiki-e/upload-rust-binary-action/pull/55 --- .github/workflows/ci.yml | 17 +++++++++++++---- .github/workflows/release.yml | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c9c1441..b351a356 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,12 +98,12 @@ jobs: - run: cargo hack build --workspace --no-private --feature-powerset --no-dev-deps - run: cargo minimal-versions build --workspace --no-private --all-features + # NB: sync with upload-assets job in release.yml. build: name: build (${{ matrix.target }}) strategy: fail-fast: false matrix: - # When updating this list, the reminder to update the target list in release.yml. include: - target: aarch64-unknown-linux-gnu - target: aarch64-unknown-linux-musl @@ -115,6 +115,8 @@ jobs: os: macos-11 - target: x86_64-pc-windows-msvc os: windows-2019 + - target: universal-apple-darwin + os: macos-11 runs-on: ${{ matrix.os || 'ubuntu-20.04' }} timeout-minutes: 60 steps: @@ -128,13 +130,20 @@ jobs: target: ${{ matrix.target }} - run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >>"${GITHUB_ENV}" if: endsWith(matrix.target, 'windows-msvc') - - run: cargo build --target ${{ matrix.target }} - - run: cargo build --target ${{ matrix.target }} --release + - uses: taiki-e/upload-rust-binary-action@v1 + with: + dry-run: true + bin: cargo-llvm-cov + target: ${{ matrix.target }} + tar: all + zip: windows + ref: refs/tags/dummy + token: dummy # For debugging - uses: actions/upload-artifact@v3 with: name: ${{ matrix.target }} - path: target/${{ matrix.target }}/release/cargo-llvm-cov* + path: cargo-llvm-cov-${{ matrix.target }}.* miri: runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8edb51e9..f580b879 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,6 +45,7 @@ jobs: env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + # NB: sync with build job in ci.yml. upload-assets: name: ${{ matrix.target }} if: github.repository_owner == 'taiki-e' @@ -52,7 +53,6 @@ jobs: - create-release strategy: matrix: - # When updating this list, the reminder to update the target list in ci.yml. include: - target: aarch64-unknown-linux-gnu - target: aarch64-unknown-linux-musl