Skip to content

Commit

Permalink
CI: add a M1 ARM64 MacOS runner
Browse files Browse the repository at this point in the history
Co-authored-by: Howard Butler <[email protected]>
  • Loading branch information
rouault and hobu committed Jan 30, 2024
1 parent 7266689 commit 035030b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 10 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,35 @@ concurrency:
jobs:

macos_build:
runs-on: macos-latest
strategy:
fail-fast: true
matrix:
include:
- platform: "macos-latest"
architecture: "x64"
# macOS-14 is a M1 ARM64 MacOS runner: https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/
- platform: "macOS-14"
architecture: "arm64"

runs-on: ${{ matrix.platform }}

if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
steps:

- uses: actions/checkout@v3

- uses: conda-incubator/setup-miniconda@v2
- uses: mamba-org/setup-micromamba@v1
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
init-shell: bash
environment-file: .github/workflows/mac/environment.yml

- name: Cache
uses: actions/cache@v3
id: cache
with:
path: ${{ github.workspace }}/.ccache
key: ${{ runner.os }}-cache-mac-${{ github.run_id }}
restore-keys: ${{ runner.os }}-cache-mac-
key: ${{ runner.os }}-cache-mac-${{ matrix.architecture }}-${{ github.run_id }}
restore-keys: ${{ runner.os }}-cache-mac-${{ matrix.architecture }}-

- name: Install Requirements
shell: bash -l {0}
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/mac/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

set -e

mamba install --yes --quiet compilers
mamba install --yes --quiet python=3.8 autoconf automake libtool pkg-config ccache jsonschema
mamba install --yes --quiet --only-deps proj=7.1.1=h45baca5_3
mamba install --yes --quiet --only-deps proj
16 changes: 16 additions & 0 deletions .github/workflows/mac/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: proj
channels:
- conda-forge
dependencies:
- python=3.8
- conda
- mamba
- compilers
- ninja
- cmake
- pkg-config
- ccache
- autoconf
- automake
- jsonschema

0 comments on commit 035030b

Please sign in to comment.