Skip to content

Commit

Permalink
Fix the release CI (#525)
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudo-rnd-thoughts authored May 6, 2024
1 parent 9ac218a commit 7354349
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 42 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
FROM quay.io/pypa/manylinux2014_x86_64

LABEL org.opencontainers.image.source https://github.com/mgbellemare/Arcade-Learning-Environment
LABEL org.opencontainers.image.source https://github.com/Farama-Foundation/Arcade-Learning-Environment

RUN yum install -y curl unzip zip tar

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ jobs:
- name: Unzip wheels asset
run: |
unzip wheels.zip -d dist
- name: Download and unpack ROMs
run: ./scripts/download_unpack_roms.sh
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
44 changes: 28 additions & 16 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,44 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup Docker
if: runner.os == 'Linux'
run: docker login ghcr.io --username "${GITHUB_ACTOR}" --password "${GITHUB_CR_TOKEN}"
env:
GITHUB_CR_TOKEN: ${{ secrets.CR_TOKEN }}
- name: Set up Docker Buildx
if: runner.os == 'linux'
id: buildx
uses: docker/setup-buildx-action@v1
with:
install: true

- name: Setup msbuild
if: runner.os == 'Windows'
uses: microsoft/setup-msbuild@v2
- name: Build Docker image with vcpkg
if: runner.os == 'linux'
# using build-push-action (without push) to make use of cache arguments
uses: docker/build-push-action@v2
with:
context: .
file: .github/docker/manylinux-vcpkg.Dockerfile
tags: manylinux-vcpkg:latest
push: false
load: true

- uses: microsoft/setup-msbuild@v2
if: runner.os == 'Windows'
# TODO(jfarebro): 02/16/2023 - There's a bug where pkg-config isn't installed on the macOS
# runner. See: https://github.com/actions/runner-images/pull/7125
- name: Install pkg-config on macOS
if: runner.os == 'macOS'
run: brew install pkg-config

- name: Setup vcpkg
if: runner.os == 'macOS' || runner.os == 'Windows'
uses: lukka/run-vcpkg@v11
- uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: "8150939b69720adc475461978e07c2d2bf5fb76e"
# There's a permissions issue with the cache
# https://github.com/microsoft/vcpkg/issues/20121
doNotCache: true

- name: Download and unpack ROMs
run: ./scripts/download_unpack_roms.sh

- name: Build wheels
uses: pypa/cibuildwheel@v2.12.0
uses: pypa/cibuildwheel@v2.17.0
env:
CIBW_ARCHS: "${{ matrix.arch }}"

Expand All @@ -62,11 +73,12 @@ jobs:
name: wheels
path: ./wheelhouse/*.whl


pypi:
name: Deploy wheels to PyPi test
runs-on: ubuntu-latest
needs: build
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v1
with:
Expand All @@ -82,9 +94,9 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_TEST_TOKEN }}
repository_url: https://test.pypi.org/legacy/
packages_dir: wheels/
print_hash: true
repository-url: https://test.pypi.org/legacy/
packages-dir: wheels/
print-hash: true


release:
Expand Down
19 changes: 0 additions & 19 deletions docker/docker-bake.hcl

This file was deleted.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ skip = ["*-win32", "*i686", "pp*", "*-musllinux*"]

build-frontend = "build"

# vcpkg manylinux images
manylinux-x86_64-image = "ghcr.io/jessefarebro/manylinux2014_x86_64-vcpkg"
manylinux-x86_64-image = "manylinux-vcpkg:latest"

[tool.cibuildwheel.linux]
environment-pass = ["GITHUB_REF"]
Expand Down

0 comments on commit 7354349

Please sign in to comment.