Skip to content

Commit

Permalink
Comment out CI script and add pull_request all for wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudo-rnd-thoughts committed Apr 23, 2024
1 parent 9ac218a commit 54d1877
Show file tree
Hide file tree
Showing 2 changed files with 161 additions and 158 deletions.
250 changes: 125 additions & 125 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,125 +1,125 @@
name: CI
on:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
push:
tags-ignore:
- "*.*"
paths-ignore:
- "docs/**"
branches:
- "*"
pull_request:
branches:
- "*"

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: pre-commit/action@v3.0.1

tests:
name: ${{ matrix.runs-on }} • py${{ matrix.python }}
needs: pre-commit
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
include:
- runs-on: ubuntu-latest
python: '3.8'
triplet: x64-linux-mixed
- runs-on: ubuntu-latest
python: '3.9'
triplet: x64-linux-mixed
- runs-on: ubuntu-latest
python: '3.10'
triplet: x64-linux-mixed
- runs-on: ubuntu-latest
python: '3.11'
triplet: x64-linux-mixed
- runs-on: ubuntu-latest
python: '3.12'
triplet: x64-linux-mixed

- runs-on: macos-12 # macos latest is macos-14-arm64 running on M1 chips which doesn't have python support
python: '3.8'
triplet: x64-osx-mixed
- runs-on: macos-12
python: '3.9'
triplet: x64-osx-mixed
- runs-on: macos-12
python: '3.10'
triplet: x64-osx-mixed
- runs-on: macos-12
python: '3.11'
triplet: x64-osx-mixed
- runs-on: macos-12
python: '3.12'
triplet: x64-osx-mixed

- runs-on: windows-latest
python: '3.8'
triplet: x64-windows
- runs-on: windows-latest
python: '3.9'
triplet: x64-windows
- runs-on: windows-latest
python: '3.10'
triplet: x64-windows
- runs-on: windows-latest
python: '3.11'
triplet: x64-windows
- runs-on: windows-latest
python: '3.12'
triplet: x64-windows
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
runs-on: ${{ matrix.runs-on }}

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Install test dependencies
# TODO(jfarebro): There's a bug with Windows cmake and PEP517 builds via pip install.
# As a temporary workaround installing cmake outside of the isolated env seems to work.
run: python -m pip install --user cmake

- 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
- 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
run: python -m pip install --verbose .[test]

- name: Test
run: python -m pytest
#name: CI
#on:
# workflow_dispatch:
# inputs:
# debug_enabled:
# type: boolean
# description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
# required: false
# default: false
# push:
# tags-ignore:
# - "*.*"
# paths-ignore:
# - "docs/**"
# branches:
# - "*"
# pull_request:
# branches:
# - "*"
#
#jobs:
# pre-commit:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: '3.10'
# - uses: pre-commit/action@v3.0.1
#
# tests:
# name: ${{ matrix.runs-on }} • py${{ matrix.python }}
# needs: pre-commit
# defaults:
# run:
# shell: bash
# strategy:
# fail-fast: false
# matrix:
# include:
# - runs-on: ubuntu-latest
# python: '3.8'
# triplet: x64-linux-mixed
# - runs-on: ubuntu-latest
# python: '3.9'
# triplet: x64-linux-mixed
# - runs-on: ubuntu-latest
# python: '3.10'
# triplet: x64-linux-mixed
# - runs-on: ubuntu-latest
# python: '3.11'
# triplet: x64-linux-mixed
# - runs-on: ubuntu-latest
# python: '3.12'
# triplet: x64-linux-mixed
#
# - runs-on: macos-12 # macos latest is macos-14-arm64 running on M1 chips which doesn't have python support
# python: '3.8'
# triplet: x64-osx-mixed
# - runs-on: macos-12
# python: '3.9'
# triplet: x64-osx-mixed
# - runs-on: macos-12
# python: '3.10'
# triplet: x64-osx-mixed
# - runs-on: macos-12
# python: '3.11'
# triplet: x64-osx-mixed
# - runs-on: macos-12
# python: '3.12'
# triplet: x64-osx-mixed
#
# - runs-on: windows-latest
# python: '3.8'
# triplet: x64-windows
# - runs-on: windows-latest
# python: '3.9'
# triplet: x64-windows
# - runs-on: windows-latest
# python: '3.10'
# triplet: x64-windows
# - runs-on: windows-latest
# python: '3.11'
# triplet: x64-windows
# - runs-on: windows-latest
# python: '3.12'
# triplet: x64-windows
# env:
# VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
# runs-on: ${{ matrix.runs-on }}
#
# steps:
# - uses: actions/checkout@v4
#
# - uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python }}
#
# - name: Install test dependencies
# # TODO(jfarebro): There's a bug with Windows cmake and PEP517 builds via pip install.
# # As a temporary workaround installing cmake outside of the isolated env seems to work.
# run: python -m pip install --user cmake
#
# - 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
# - 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
# run: python -m pip install --verbose .[test]
#
# - name: Test
# run: python -m pytest
69 changes: 36 additions & 33 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
tags:
- 'v*'
pull_request:
branches:
- "*"

jobs:
build:
Expand Down Expand Up @@ -87,36 +90,36 @@ jobs:
print_hash: true


release:
name: Stage wheels to Github releases
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v1
with:
name: wheels

- name: Create wheel archive
run: |
zip --junk-paths wheels wheels/*
- name: Create release
id: create_release
uses: actions/create-release@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: ${{ contains(github.ref, '-') }}

- name: Upload artifacts to release
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./wheels.zip
asset_name: wheels.zip
asset_content_type: application/zip
# release:
# name: Stage wheels to Github releases
# runs-on: ubuntu-latest
# needs: build
# steps:
# - uses: actions/download-artifact@v1
# with:
# name: wheels
#
# - name: Create wheel archive
# run: |
# zip --junk-paths wheels wheels/*
#
# - name: Create release
# id: create_release
# uses: actions/create-release@v1.0.0
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# draft: true
# prerelease: ${{ contains(github.ref, '-') }}
#
# - name: Upload artifacts to release
# uses: actions/upload-release-asset@v1.0.1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./wheels.zip
# asset_name: wheels.zip
# asset_content_type: application/zip

0 comments on commit 54d1877

Please sign in to comment.