Skip to content

Commit

Permalink
CI: use macOS ARM-based runner (#3395)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilason authored Feb 15, 2024
1 parent f4334e4 commit 05b9b03
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 36 deletions.
52 changes: 23 additions & 29 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,40 +20,34 @@ concurrency:
jobs:
macos_build:
name: macOS build
runs-on: macos-latest
runs-on: macos-14
steps:
- name: Info
run: |
echo "macOS version $(sw_vers -productVersion)"
echo "architecture $(uname -a)"
- name: Disabling Spotlight
run: sudo mdutil -a -i off
- name: Uninstalling Homebrew
run: |
echo "Moving directories..."
sudo mkdir /opt/off
/usr/bin/sudo /usr/bin/find /usr/local /opt/homebrew -mindepth 1 -maxdepth 1 \
-type d -print -exec /bin/mv {} /opt/off/ \;
echo "Removing files..."
/usr/bin/sudo /usr/bin/find /usr/local /opt/homebrew -mindepth 1 -maxdepth 1 \
-type f -print -delete
hash -r
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v3
with:
channels: conda-forge
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: grass-env
use-mamba: true
- name: Get cache date
id: get-date
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
shell: bash
- name: Cache conda environment
uses: actions/cache@v4
- name: Setup Mamba
uses: mamba-org/setup-micromamba@v1
with:
path: ~/miniconda3/envs/grass-env
key: conda-macos-x86_64-${{
steps.get-date.outputs.today }}-${{
hashFiles('.github/workflows/macos_dependencies.txt') }}-${{
env.CACHE_NUMBER }}
id: cache
- name: Update environment
run: mamba env update -n grass-env -f .github/workflows/macos_dependencies.txt
if: steps.cache.outputs.cache-hit != 'true'
- name: Conda info
init-shell: bash
environment-file: .github/workflows/macos_dependencies.txt
environment-name: grass-env
- name: Environment info
shell: bash -el {0}
run: |
conda info
conda list
conda config --show-sources
conda config --show
printenv | sort
$CC --version
- name: Create installation directory
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/macos_dependencies.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
clang_osx-64
clangxx_osx-64
clang_osx-arm64
clangxx_osx-arm64
setuptools
python
python.app
Expand Down Expand Up @@ -32,7 +32,8 @@ zstd
pdal
ply
postgresql
postgis
# postgis>=3.1.4
cmake
llvm-openmp
flex
git
2 changes: 1 addition & 1 deletion .github/workflows/macos_gunittest.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ exclude =
python/grass/temporal/testsuite/unittests_temporal_raster_algebra_equal_ts.py
python/grass/temporal/testsuite/unittests_temporal_raster_conditionals_complement_else.py
raster/r.in.lidar/testsuite/test_base_resolution.sh
raster/r.in.lidar/testsuite/test_base_resolution.sh
raster/r.in.pdal/testsuite/test_r_in_pdal_binning.py
raster/r.in.pdal/testsuite/test_r_in_pdal_selection.py
raster/r.terraflow/testsuite/test_r_terraflow.py
raster/r.sun/testsuite/test_rsun.py
raster3d/r3.flow/testsuite/r3flow_test.py
scripts/g.search.modules/testsuite/test_g_search_modules.py
temporal/t.connect/testsuite/test_distr_tgis_db_raster3d.py
temporal/t.connect/testsuite/test_distr_tgis_db_raster.py
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/macos_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ if [ -z "$1" ]; then
exit 1
fi

# recommended in https://gitter.im/conda-forge/conda-forge.github.io?at=5c40da7f95e17b45256960ce
find ${CONDA_PREFIX}/lib -name '*.la' -delete

CONDA_ARCH=$(uname -m)
INSTALL_PREFIX=$1

Expand Down

0 comments on commit 05b9b03

Please sign in to comment.