From edc85301a16e70843039cd9dddc8a1cb3a5456d0 Mon Sep 17 00:00:00 2001 From: Jonathan Grahl Date: Wed, 27 Mar 2024 07:45:35 -0500 Subject: [PATCH] ci: setup rust target correctly (#25) * ci: setup rust target correctly * run on correct os * ci: build aarch64 darwin on macos-14-arm * ci: run both macos builds on macos-14 --- .github/workflows/release.yaml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2a01971..b4d4f2d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,13 +17,11 @@ jobs: - TARGET: x86_64-unknown-linux-gnu # tested in a debian container on a mac OS: ubuntu-latest - TARGET: x86_64-apple-darwin # tested on a mac - OS: macos-latest + OS: macos-14 - TARGET: aarch64-apple-darwin - OS: macos-arm-latest - - TARGET: x86_64-pc-windows-msvc # tested on a windows machine - OS: windows-latest + OS: macos-14 name: Create Release ${{ github.event_name == 'pull_request' && '(dry-run)' }} - runs-on: ubuntu-22.04 + runs-on: ${{ matrix.OS }} env: TARGET: ${{ matrix.TARGET }} OS: ${{ matrix.OS }} @@ -50,6 +48,8 @@ jobs: - name: Setup Rust uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + target: $TARGET - name: Generate the artifacts run: cargo build --release --target $TARGET @@ -57,12 +57,7 @@ jobs: - name: Move files run: | mkdir -p ./artifacts - if [[ $OS =~ ^windows.*$ ]]; then - EXEC=molnctl.exe - else - EXEC=molnctl - fi - mv ./target/$TARGET/release/$EXEC ./artifacts + mv ./target/$TARGET/release/molnctl ./artifacts/molnctl-$TARGET - name: Create Release if: github.event_name == 'push'