diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 79cd5fec01..f5a5b07e38 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,17 +27,17 @@ jobs: name: Linux ${{ matrix.arch }} runs-on: ubuntu-24.04 + container: + image: messense/rust-musl-cross:${{ matrix.container }} + steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0 - - name: Build in Docker - run: scripts/build-in-docker.sh - env: - TARGET: ${{ matrix.target }} - DOCKER_TAG: ${{ matrix.container }} + - name: Build + run: cargo build --release --target=${{ matrix.target }} --locked - name: Rename Binary - run: mv target/*/release/sentry-cli sentry-cli-Linux-${{ matrix.arch }} + run: mv target/${{ matrix.target }}/release/sentry-cli sentry-cli-Linux-${{ matrix.arch }} - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2 with: diff --git a/scripts/build-in-docker.sh b/scripts/build-in-docker.sh deleted file mode 100755 index abb77c838b..0000000000 --- a/scripts/build-in-docker.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -set -eux - -DOCKER_IMAGE="messense/rust-musl-cross:${DOCKER_TAG}" -BUILD_DIR="/work" - -DOCKER_RUN_OPTS=" - -w ${BUILD_DIR} - -v $(pwd):${BUILD_DIR}:ro - -v $(pwd)/target:${BUILD_DIR}/target - -v $HOME/.cargo/registry:/root/.cargo/registry - ${DOCKER_IMAGE} -" - -docker run \ - ${DOCKER_RUN_OPTS} \ - cargo build --release --target=${TARGET} --locked - -# Smoke test (but only when building from the same repo). -# $TRAVIS_PULL_REQUEST_SLUG is set either to head repo slug, or to "" when -# building branches. -if [[ "${TRAVIS_PULL_REQUEST_SLUG:-x}" =~ ^(getsentry/sentry-cli)?$ ]]; then - env | grep SENTRY_ > .env - docker run \ - --env-file=.env \ - ${DOCKER_RUN_OPTS} \ - cargo run --release --target=${TARGET} -- releases list -fi - -# Fix permissions for shared directories -USER_ID=$(id -u) -GROUP_ID=$(id -g) -sudo chown -R ${USER_ID}:${GROUP_ID} target/ $HOME/.cargo