From 7e31c59ae32c53c28721565d78a94d8f4a9a7542 Mon Sep 17 00:00:00 2001 From: Wen Kokke Date: Sat, 10 Feb 2024 15:45:20 +0000 Subject: [PATCH 1/6] Use new runner with macOS Sonoma --- .github/workflows/build-vehicle-python.yml | 7 ++++++- .github/workflows/build-vehicle.yml | 6 ++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-vehicle-python.yml b/.github/workflows/build-vehicle-python.yml index d5e29eff4..ad0a4b5d3 100644 --- a/.github/workflows/build-vehicle-python.yml +++ b/.github/workflows/build-vehicle-python.yml @@ -32,10 +32,15 @@ jobs: plat: "musllinux" test: "test" - name: "macOS" - type: "macos-latest" + type: "macos-12" arch: "x86_64" plat: "macosx" test: "test,tensorflow" + - name: "macOS" + type: "macos-14" + arch: "arm64" + plat: "macosx" + test: "test" - name: "Windows" type: "windows-latest" arch: "AMD64" diff --git a/.github/workflows/build-vehicle.yml b/.github/workflows/build-vehicle.yml index 0757447be..b02808abc 100644 --- a/.github/workflows/build-vehicle.yml +++ b/.github/workflows/build-vehicle.yml @@ -14,8 +14,10 @@ jobs: os: - name: "Linux" type: ubuntu-latest - - name: "macOS" - type: "macos-latest" + - name: "macOS (x86_64)" + type: "macos-12" + - name: "macOS (arm64)" + type: "macos-14" - name: "Windows" type: "windows-latest" haskell: From 0192226bd8c6f4a91b495bdf72f39197c57e2993 Mon Sep 17 00:00:00 2001 From: Wen Kokke Date: Sat, 10 Feb 2024 16:14:37 +0000 Subject: [PATCH 2/6] Add arch label to all runners --- .github/workflows/build-vehicle.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-vehicle.yml b/.github/workflows/build-vehicle.yml index b02808abc..b6fe92100 100644 --- a/.github/workflows/build-vehicle.yml +++ b/.github/workflows/build-vehicle.yml @@ -14,12 +14,16 @@ jobs: os: - name: "Linux" type: ubuntu-latest - - name: "macOS (x86_64)" + arch: "x86_64" + - name: "macOS" type: "macos-12" - - name: "macOS (arm64)" + arch: "x86_64" + - name: "macOS" type: "macos-14" + arch: "arm64" - name: "Windows" type: "windows-latest" + arch: "amd64" haskell: - ghc: version: "9.4.8" @@ -33,6 +37,7 @@ jobs: - os: name: Linux type: ubuntu-latest + arch: "x86_64" haskell: ghc: version: "9.8.1" @@ -46,6 +51,7 @@ jobs: - os: name: Linux type: ubuntu-latest + arch: "x86_64" haskell: ghc: version: "9.6.4" @@ -58,6 +64,7 @@ jobs: - os: name: Linux type: ubuntu-latest + arch: "x86_64" haskell: ghc: version: "9.2.8" @@ -70,6 +77,7 @@ jobs: - os: name: Linux type: ubuntu-latest + arch: "x86_64" haskell: ghc: version: "9.0.2" @@ -82,6 +90,7 @@ jobs: - os: name: Linux type: ubuntu-latest + arch: "x86_64" haskell: ghc: version: "8.10.7" @@ -94,6 +103,7 @@ jobs: - os: name: Linux type: ubuntu-latest + arch: "x86_64" haskell: ghc: version: "9.4.8" @@ -108,6 +118,7 @@ jobs: # - os: # name: Linux # type: ubuntu-latest + # arch: "x86_64" # haskell: # ghc: # version: "9.4.8" @@ -121,6 +132,7 @@ jobs: # - os: # name: Linux # type: ubuntu-latest + # arch: "x86_64" # haskell: # ghc: # version: "9.4.8" @@ -129,7 +141,7 @@ jobs: # project-file: "cabal.project.ghc-debug.nothunks.ghc-9.4.8" # extra-args: "-fghc-debug -fnothunks" - name: vehicle / ${{ matrix.os.name }} - GHC ${{ matrix.haskell.ghc.version }} ${{ matrix.haskell.cabal.extra-args }} + name: vehicle / ${{ matrix.os.name }} - ${{ matrix.os.arch }} - GHC ${{ matrix.haskell.ghc.version }} ${{ matrix.haskell.cabal.extra-args }} runs-on: ${{ matrix.os.type }} steps: From dfeb4bb4ee447fc7907ac908fddc81ec77c90b4d Mon Sep 17 00:00:00 2001 From: Wen Kokke Date: Sat, 10 Feb 2024 17:47:00 +0000 Subject: [PATCH 3/6] Don't test py38 wheels on macosx with arm64 --- vehicle-python/pyproject.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vehicle-python/pyproject.toml b/vehicle-python/pyproject.toml index 6cb03e635..b489858f6 100644 --- a/vehicle-python/pyproject.toml +++ b/vehicle-python/pyproject.toml @@ -58,6 +58,14 @@ skip = [ # PyPy builds do not work. "pp*", ] +test-skip = [ + # 10-02-2024: + # While cibuildwheel can build CPython 3.8 universal2/arm64 wheels, + # it cannot test the arm64 part of them, even when running on an Apple Silicon machine. + # This is because we use the x86_64 installer of CPython 3.8. + # See the discussion in https://github.com/pypa/cibuildwheel/pull/1169 for the details. + "cp38-macosx_*:arm64" +] test-command = "pytest {package}/tests" test-extras = "test" # 19-06-2023: From 720601017b15c633b02dfc209a59c06d7c625151 Mon Sep 17 00:00:00 2001 From: Wen Kokke Date: Sat, 10 Feb 2024 17:51:21 +0000 Subject: [PATCH 4/6] Add macosx-arm64 --- vehicle-python/pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/vehicle-python/pyproject.toml b/vehicle-python/pyproject.toml index b489858f6..711c91ad6 100644 --- a/vehicle-python/pyproject.toml +++ b/vehicle-python/pyproject.toml @@ -42,6 +42,7 @@ build-frontend = "build" build = [ # Using a GitHub runner "*-macosx_x86_64", + "*-macosx_arm64", # Using a GitHub runner "*-win_amd64", # Using wenkokke/manylinux2014_ghc948_x86_64 From f8bad411fedb4ebd54a46428690ad9125e96dd47 Mon Sep 17 00:00:00 2001 From: Wen Kokke Date: Sat, 10 Feb 2024 18:45:16 +0000 Subject: [PATCH 5/6] Fix test-skip --- vehicle-python/pyproject.toml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/vehicle-python/pyproject.toml b/vehicle-python/pyproject.toml index 711c91ad6..a64a57259 100644 --- a/vehicle-python/pyproject.toml +++ b/vehicle-python/pyproject.toml @@ -59,14 +59,12 @@ skip = [ # PyPy builds do not work. "pp*", ] -test-skip = [ - # 10-02-2024: - # While cibuildwheel can build CPython 3.8 universal2/arm64 wheels, - # it cannot test the arm64 part of them, even when running on an Apple Silicon machine. - # This is because we use the x86_64 installer of CPython 3.8. - # See the discussion in https://github.com/pypa/cibuildwheel/pull/1169 for the details. - "cp38-macosx_*:arm64" -] +# 10-02-2024: +# While cibuildwheel can build CPython 3.8 universal2/arm64 wheels, +# it cannot test the arm64 part of them, even when running on an Apple Silicon machine. +# This is because we use the x86_64 installer of CPython 3.8. +# See the discussion in https://github.com/pypa/cibuildwheel/pull/1169 for the details. +test-skip = "cp38-macosx_*:arm64" test-command = "pytest {package}/tests" test-extras = "test" # 19-06-2023: From 04d428e762306ff62de2c162784a40c029cbde8a Mon Sep 17 00:00:00 2001 From: Wen Kokke Date: Sat, 17 Feb 2024 18:42:59 +0000 Subject: [PATCH 6/6] Use internal setup-haskell action --- .github/workflows/build-vehicle-python.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-vehicle-python.yml b/.github/workflows/build-vehicle-python.yml index ad0a4b5d3..3e3f476ca 100644 --- a/.github/workflows/build-vehicle-python.yml +++ b/.github/workflows/build-vehicle-python.yml @@ -54,12 +54,14 @@ jobs: - name: Get source uses: actions/checkout@v4 - - name: Setup GHC ${{ env.DEFAULT_GHC_VERSION }} + - name: Setup Haskell if: matrix.os.name == 'macOS' || matrix.os.name == 'Windows' - uses: haskell/actions/setup@v2 + uses: ./.github/actions/setup-haskell with: ghc-version: ${{ env.DEFAULT_GHC_VERSION }} cabal-version: ${{ env.DEFAULT_CABAL_VERSION }} + cabal-project-file: "vehicle-python/cabal.project" + cabal-project-freeze-file: "vehicle-python/cabal.project.freeze" - name: Build wheel uses: pypa/cibuildwheel@v2.16.5