From 8768cd23c19509cb79aa9594b9e4c2e24bd95a60 Mon Sep 17 00:00:00 2001
From: David Li
Date: Tue, 19 Mar 2024 12:09:27 -0400
Subject: [PATCH] ci: use native GitHub Actions M1 runner (#1645)
Fixes #1548.
---
.github/workflows/native-unix.yml | 38 ++++++++++++++++++++++---------
.github/workflows/packaging.yml | 20 +++++++++++-----
2 files changed, 41 insertions(+), 17 deletions(-)
diff --git a/.github/workflows/native-unix.yml b/.github/workflows/native-unix.yml
index 052fcce8a2..2f4152de3c 100644
--- a/.github/workflows/native-unix.yml
+++ b/.github/workflows/native-unix.yml
@@ -63,7 +63,14 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: ["macos-latest", "ubuntu-latest"]
+ os: ["macos-latest", "macos-14", "ubuntu-latest"]
+ include:
+ - os: macos-latest
+ goarch: x64
+ - os: macos-14
+ goarch: arm64
+ - os: ubuntu-latest
+ goarch: x64
env:
# Required for macOS
# https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk
@@ -110,7 +117,7 @@ jobs:
export ADBC_BUILD_TESTS=OFF
export ADBC_USE_ASAN=OFF
export ADBC_USE_UBSAN=OFF
- export PATH=$RUNNER_TOOL_CACHE/go/1.19.13/x64/bin:$PATH
+ export PATH=$RUNNER_TOOL_CACHE/go/1.19.13/${{ matrix.goarch }}/bin:$PATH
export ADBC_CMAKE_ARGS="-DCMAKE_UNITY_BUILD=ON"
./ci/scripts/cpp_build.sh "$(pwd)" "$(pwd)/build" "$HOME/local"
- name: Go Build
@@ -118,7 +125,7 @@ jobs:
env:
CGO_ENABLED: "1"
run: |
- export PATH=$RUNNER_TOOL_CACHE/go/1.19.13/x64/bin:$PATH
+ export PATH=$RUNNER_TOOL_CACHE/go/1.19.13/${{ matrix.goarch }}/bin:$PATH
./ci/scripts/go_build.sh "$(pwd)" "$(pwd)/build" "$HOME/local"
- uses: actions/upload-artifact@v3
@@ -136,7 +143,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: ["macos-latest", "ubuntu-latest"]
+ os: ["macos-latest", "macos-14", "ubuntu-latest"]
env:
# Required for macOS
# https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk
@@ -241,6 +248,8 @@ jobs:
- drivers-build-conda
strategy:
matrix:
+ # N.B. no macos-14 here since conda-forge does not package
+ # arrow-c-glib for M1
os: ["macos-latest", "ubuntu-latest"]
env:
# Required for macOS
@@ -304,7 +313,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: ["macos-latest", "ubuntu-latest", "windows-latest"]
+ os: ["macos-latest", "macos-14", "ubuntu-latest", "windows-latest"]
steps:
- uses: actions/checkout@v4
with:
@@ -346,7 +355,14 @@ jobs:
- drivers-build-conda
strategy:
matrix:
- os: ["macos-latest", "ubuntu-latest"]
+ os: ["macos-latest", "macos-14", "ubuntu-latest"]
+ include:
+ - os: macos-latest
+ goarch: x64
+ - os: macos-14
+ goarch: arm64
+ - os: ubuntu-latest
+ goarch: x64
env:
CGO_ENABLED: "1"
steps:
@@ -389,7 +405,7 @@ jobs:
cache-dependency-path: go/adbc/go.sum
- name: Install staticcheck
shell: bash -l {0}
- if: ${{ !contains('macos-latest', matrix.os) }}
+ if: matrix.os == 'ubuntu-latest'
run: go install honnef.co/go/tools/cmd/staticcheck@v0.3.3
- uses: actions/download-artifact@v3
@@ -400,10 +416,10 @@ jobs:
- name: Go Build
shell: bash -l {0}
run: |
- export PATH=$RUNNER_TOOL_CACHE/go/1.19.13/x64/bin:$PATH
+ export PATH=$RUNNER_TOOL_CACHE/go/1.19.13/${{ matrix.goarch }}/bin:$PATH
./ci/scripts/go_build.sh "$(pwd)" "$(pwd)/build" "$HOME/local"
- name: Run Staticcheck
- if: ${{ !contains('macos-latest', matrix.os) }}
+ if: matrix.os == 'ubuntu-latest'
shell: bash -l {0}
run: |
pushd go/adbc
@@ -414,7 +430,7 @@ jobs:
env:
SNOWFLAKE_URI: ${{ secrets.SNOWFLAKE_URI }}
run: |
- export PATH=$RUNNER_TOOL_CACHE/go/1.19.13/x64/bin:$PATH
+ export PATH=$RUNNER_TOOL_CACHE/go/1.19.13/${{ matrix.goarch }}/bin:$PATH
./ci/scripts/go_test.sh "$(pwd)" "$(pwd)/build" "$HOME/local"
# ------------------------------------------------------------
@@ -427,7 +443,7 @@ jobs:
- drivers-build-conda
strategy:
matrix:
- os: ["macos-latest", "ubuntu-latest"]
+ os: ["macos-latest", "macos-14", "ubuntu-latest"]
python: ["3.9", "3.11"]
env:
# Required for macOS
diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml
index c6cde1e9a3..824bf670d9 100644
--- a/.github/workflows/packaging.yml
+++ b/.github/workflows/packaging.yml
@@ -627,13 +627,18 @@ jobs:
python-macos:
name: "Python ${{ matrix.arch }} macOS"
- runs-on: macos-latest
+ runs-on: ${{ matrix.os }}
needs:
- source
strategy:
fail-fast: false
matrix:
- arch: ["amd64", "arm64v8"]
+ os: ["macos-latest", "macos-14"]
+ include:
+ - os: macos-latest
+ arch: amd64
+ - os: macos-14
+ arch: arm64v8
env:
MACOSX_DEPLOYMENT_TARGET: "10.15"
PYTHON: "/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10"
@@ -686,11 +691,17 @@ jobs:
cache: true
cache-dependency-path: adbc/go/adbc/go.sum
- - name: Install Python
+ - name: Install Python (AMD64 only)
+ if: matrix.arch == 'amd64'
run: |
pushd adbc
sudo ci/scripts/install_python.sh macos 3.8
sudo ci/scripts/install_python.sh macos 3.9
+ popd
+
+ - name: Install Python (AMD64 only)
+ run: |
+ pushd adbc
sudo ci/scripts/install_python.sh macos 3.10
sudo ci/scripts/install_python.sh macos 3.11
sudo ci/scripts/install_python.sh macos 3.12
@@ -741,7 +752,6 @@ jobs:
deactivate
- name: Test wheel 3.10
- if: matrix.arch == 'amd64'
run: |
pushd adbc
@@ -752,7 +762,6 @@ jobs:
deactivate
- name: Test wheel 3.11
- if: matrix.arch == 'amd64'
run: |
pushd adbc
@@ -763,7 +772,6 @@ jobs:
deactivate
- name: Test wheel 3.12
- if: matrix.arch == 'amd64'
run: |
pushd adbc