From b0653c44fb6e3776653973861a4732c89801173e Mon Sep 17 00:00:00 2001 From: Vincent Moens Date: Wed, 31 Jan 2024 12:13:03 +0000 Subject: [PATCH] [CI] Fix macos build (#1856) --- .github/workflows/build-wheels-m1.yml | 21 ++++++++++++++------- .github/workflows/wheels.yml | 4 ++-- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-wheels-m1.yml b/.github/workflows/build-wheels-m1.yml index 9cbdf460894..84fe79d09d2 100644 --- a/.github/workflows/build-wheels-m1.yml +++ b/.github/workflows/build-wheels-m1.yml @@ -13,6 +13,10 @@ on: - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ workflow_dispatch: +permissions: + id-token: write + contents: read + jobs: generate-matrix: uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main @@ -23,20 +27,23 @@ jobs: test-infra-ref: main build: needs: generate-matrix + strategy: + fail-fast: false + matrix: + include: + - repository: pytorch/rl + smoke-test-script: test/smoke_test.py + package-name: torchrl name: pytorch/rl uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@main with: - repository: pytorch/rl + repository: ${{ matrix.repository }} ref: "" test-infra-repository: pytorch/test-infra test-infra-ref: main build-matrix: ${{ needs.generate-matrix.outputs.matrix }} - post-script: "" - package-name: torchrl + package-name: ${{ matrix.package-name }} runner-type: macos-m1-stable - smoke-test-script: "" + smoke-test-script: ${{ matrix.smoke-test-script }} trigger-event: ${{ github.event_name }} env-var-script: .github/scripts/m1_script.sh - secrets: - AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} - AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 428997ba3e8..47c1b0c6fec 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -53,7 +53,7 @@ jobs: path: dist/*.whl build-wheel-mac: - runs-on: macos-latest + runs-on: macos-11 strategy: matrix: python_version: [["3.8", "3.8"], ["3.9", "3.9"], ["3.10", "3.10.3"], ["3.11", "3.11"]] @@ -121,7 +121,7 @@ jobs: needs: [build-wheel-linux, build-wheel-mac] strategy: matrix: - os: [["linux", "ubuntu-20.04"], ["mac", "macos-latest"]] + os: [["linux", "ubuntu-20.04"], ["mac", "macos-11"]] python_version: [ "3.8", "3.9", "3.10", "3.11" ] runs-on: ${{ matrix.os[1] }} steps: