Skip to content

contributing: Add security policy (#3544) #261

contributing: Add security policy (#3544)

contributing: Add security policy (#3544) #261

Workflow file for this run

---
name: macOS
# Build and run tests on macOS
on:
push:
branches:
- main
- releasebranch_*
pull_request:
branches:
- main
- releasebranch_*
env:
CACHE_NUMBER: 0
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
macos_build:
name: macOS build
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@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
- name: Setup Mamba
uses: mamba-org/setup-micromamba@422500192359a097648154e8db4e39bdb6c6eed7 # v1.8.1
with:
init-shell: bash
environment-file: .github/workflows/macos_dependencies.txt
environment-name: grass-env
- name: Environment info
shell: bash -el {0}
run: |
printenv | sort
$CC --version
- name: Create installation directory
run: mkdir $HOME/install
- name: Build and install
shell: bash -l {0}
run: source ./.github/workflows/macos_install.sh $HOME/install
- name: Add the bin directory to PATH
run: echo "$HOME/install/bin" >> $GITHUB_PATH
- name: Check installed version
shell: bash -l {0}
run: source ./.github/workflows/print_versions.sh
- name: Run tests
shell: bash -el {0}
run: >
grass --tmp-location XY --exec \
g.download.location url=${{ env.SampleData }} path=$HOME
grass --tmp-location XY --exec \
python3 -m grass.gunittest.main \
--grassdata $HOME --location nc_spm_full_v2alpha2 --location-type nc \
--min-success 100 --config .github/workflows/macos_gunittest.cfg
env:
SampleData: "https://grass.osgeo.org/sampledata/north_carolina/\
nc_spm_full_v2alpha2.tar.gz"
- name: Make HTML test report available
if: ${{ always() }}
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: testreport-macOS
path: testreport
retention-days: 3