From 77f5e5760ee4bb84e49c6724ab3fd5f65c34de43 Mon Sep 17 00:00:00 2001 From: Marco Ieni <11428655+MarcoIeni@users.noreply.github.com> Date: Sun, 25 Feb 2024 21:59:13 +0100 Subject: [PATCH 1/2] chore(ci): use mac os 14 for aarch64 --- .github/workflows/cd-check.yml | 77 ++++++++++++++++++++++++++++++++++ .github/workflows/cd.yml | 4 +- .github/workflows/ci.yml | 2 - 3 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/cd-check.yml diff --git a/.github/workflows/cd-check.yml b/.github/workflows/cd-check.yml new file mode 100644 index 0000000000..fc00fe7e25 --- /dev/null +++ b/.github/workflows/cd-check.yml @@ -0,0 +1,77 @@ +name: CD # Continuous Deployment + +permissions: + # TODO: once `releases: write` is supported, use it instead. + contents: write + +on: + push: + branches: + - main + paths-ignore: + - "**.md" + pull_request: + paths-ignore: + - "**.md" + +env: + CARGO_INCREMENTAL: 0 + CARGO_NET_GIT_FETCH_WITH_CLI: true + CARGO_NET_RETRY: 10 + CARGO_TERM_COLOR: always + RUST_BACKTRACE: 1 + RUSTFLAGS: -D warnings + RUSTUP_MAX_RETRIES: 10 + +defaults: + run: + shell: bash + +jobs: + upload-assets: + name: ${{ matrix.target }} + if: github.repository_owner == 'MarcoIeni' && startsWith(github.event.release.name, 'release-plz-v') + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - target: aarch64-pc-windows-msvc + os: windows-2022 + - target: x86_64-unknown-linux-gnu + os: ubuntu-22.04 + - target: x86_64-apple-darwin + os: macos-13 + - target: x86_64-pc-windows-msvc + os: windows-2022 + - target: x86_64-unknown-linux-musl + os: ubuntu-22.04 + - target: aarch64-unknown-linux-gnu + os: ubuntu-22.04 + - target: aarch64-unknown-linux-musl + os: ubuntu-22.04 + - target: aarch64-apple-darwin + os: macos-14 + - target: x86_64-unknown-freebsd + os: ubuntu-22.04 + timeout-minutes: 60 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + - uses: taiki-e/setup-cross-toolchain-action@v1 + with: + target: ${{ matrix.target }} + if: startsWith(matrix.os, 'ubuntu') && !contains(matrix.target, '-musl') + - uses: taiki-e/install-action@cross + if: contains(matrix.target, '-musl') + - run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >> "${GITHUB_ENV}" + if: endsWith(matrix.target, 'windows-msvc') + - uses: taiki-e/upload-rust-binary-action@v1 + with: + bin: release-plz + target: ${{ matrix.target }} + tar: all + zip: windows + dry-run: false + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index c0998afa02..a843c0e793 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -44,11 +44,9 @@ jobs: - target: aarch64-unknown-linux-musl os: ubuntu-22.04 - target: aarch64-apple-darwin - os: macos-13 + os: macos-14 - target: x86_64-unknown-freebsd os: ubuntu-22.04 - - target: universal-apple-darwin - os: macos-13 timeout-minutes: 60 steps: - name: Checkout repository diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 072bbecd09..4e74f6c063 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,8 +45,6 @@ jobs: os: macos-13 - target: x86_64-pc-windows-msvc os: windows-2022 - - target: universal-apple-darwin - os: macos-13 runs-on: ${{ matrix.os }} steps: - name: Checkout repository From d95524e2a793bd834958900d9b51040ce9351b8a Mon Sep 17 00:00:00 2001 From: Marco Ieni <11428655+MarcoIeni@users.noreply.github.com> Date: Sun, 25 Feb 2024 22:00:43 +0100 Subject: [PATCH 2/2] wip --- .github/workflows/cd-check.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/cd-check.yml b/.github/workflows/cd-check.yml index fc00fe7e25..02e3cdd744 100644 --- a/.github/workflows/cd-check.yml +++ b/.github/workflows/cd-check.yml @@ -1,8 +1,4 @@ -name: CD # Continuous Deployment - -permissions: - # TODO: once `releases: write` is supported, use it instead. - contents: write +name: CD Check # Continuous Deployment on: push: @@ -30,7 +26,6 @@ defaults: jobs: upload-assets: name: ${{ matrix.target }} - if: github.repository_owner == 'MarcoIeni' && startsWith(github.event.release.name, 'release-plz-v') runs-on: ${{ matrix.os }} strategy: matrix: