run macos ci on arm runner #1778
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI-JUDI | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
# Trigger the workflow on push to master or pull request | |
# to be merged in master | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
name: JUDI base on Julia ${{ matrix.version }} - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
env: | |
DEVITO_LANGUAGE: "openmp" | |
OMP_NUM_THREADS: 4 | |
GROUP: "JUDI" | |
strategy: | |
fail-fast: false | |
matrix: | |
version: ['1.6', '1.7', '1.8', '1.9', '1.10'] | |
os: [ubuntu-latest, macos-latest] | |
steps: | |
- name: Checkout JUDI | |
uses: actions/checkout@v4 | |
- name: Cache julia install | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-julia-pkgs | |
with: | |
# julia is installed in ~/.julia | |
path: ~/.julia | |
key: ${{ matrix.os }}-${{ matrix.version }}-${{ env.cache-name }} | |
- name: Setup julia | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.version }} | |
arch: x64 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: setup devito config | |
run: | |
if [ "${{matrix.os}}" = "macos-latest" ]; then | |
echo "DEVITO_ARCH=clang" >> $GITHUB_ENV | |
echo "DEVITO_PLATFORM=m1" >> $GITHUB_ENV | |
else | |
echo "DEVITO_ARCH=gcc-12" >> $GITHUB_ENV | |
echo "DEVITO_PLATFORM=cpu64" >> $GITHUB_ENV | |
fi | |
- name: Set julia python | |
run: | | |
PYTHON=$(which python3) julia -e 'using Pkg;Pkg.add("PyCall");Pkg.build("PyCall")' | |
- name: Build JUDI | |
uses: julia-actions/julia-buildpkg@latest | |
- name: Run tests | |
uses: julia-actions/julia-runtest@latest | |
with: | |
annotate: true | |
- uses: julia-actions/julia-processcoverage@v1 | |
- uses: codecov/codecov-action@v3 | |
with: | |
file: lcov.info |