From bb63d1d03033b97fa6b5bc54004c9e1c30717d8d Mon Sep 17 00:00:00 2001 From: mloubout Date: Mon, 30 Sep 2024 21:09:29 -0400 Subject: [PATCH] switch to arm macos runner --- .github/workflows/ci-judi.yml | 10 ++++++-- .github/workflows/ci-op.yml | 45 +++++++++++++++++++++++++++-------- deps/build.jl | 6 ++--- 3 files changed, 46 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci-judi.yml b/.github/workflows/ci-judi.yml index 9158927c0..181b8727c 100644 --- a/.github/workflows/ci-judi.yml +++ b/.github/workflows/ci-judi.yml @@ -29,7 +29,13 @@ jobs: matrix: version: ['1.6', '1.7', '1.8', '1.9', '1.10'] - os: [ubuntu-latest, macos-13] + os: [ubuntu-latest] + arch: ['x64'] + + include: + - os: macos-latest + version: '1' + arch: ARM64 steps: - name: Checkout JUDI @@ -39,7 +45,7 @@ jobs: uses: julia-actions/setup-julia@v1 with: version: ${{ matrix.version }} - arch: x64 + arch: ${{ matrix.arch }} - name: Set up Python 3.9 uses: actions/setup-python@v4 diff --git a/.github/workflows/ci-op.yml b/.github/workflows/ci-op.yml index bfa7dc88d..8898e031b 100644 --- a/.github/workflows/ci-op.yml +++ b/.github/workflows/ci-op.yml @@ -34,37 +34,43 @@ jobs: version: ['1'] omp: [2] cc: ['gcc-11'] + arch: ['x64'] include: - - os: macos-13 - version: '1.6' + - os: macos-15 + version: '1' op: "ISO_OP" omp: 1 - cc: gcc-13 + cc: clang + arch: ARM64 - - os: macos-13 + - os: macos-15 version: '1.8' op: "ISO_OP" omp: 1 - cc: gcc-13 + cc: clang + arch: ARM64 - - os: macos-13 + - os: macos-15 version: '1.9' op: "ISO_OP" omp: 1 - cc: gcc-13 + cc: clang + arch: ARM64 - os: ubuntu-latest version: '1.9' op: "VISCO_AC_OP" omp: 2 cc: gcc-11 + arch: x64 - os: ubuntu-latest version: '1.10' op: "ISO_OP" omp: 2 cc: gcc-11 + arch: x64 steps: - name: Checkout JUDI @@ -74,22 +80,41 @@ jobs: uses: julia-actions/setup-julia@v1 with: version: ${{ matrix.version }} - arch: x64 + arch: ${{ matrix.arch }} + + - name: Setup clang for osx + if: runner.os == 'macOS' + run: | + brew install libomp + echo "PATH=$(brew --prefix llvm@18)/bin:$PATH" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=$(brew --prefix llvm@18)/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV + xcode-select -s /Applications/Xcode.app/Contents/Developer + + - name: Debug clang + if: runner.os == 'macOS' + run: | + clang -xc /dev/null -E -Wp,-v 2>&1 | sed -n 's,^ ,,p' + clang -xc /dev/null -E -Wp,-v 2>&1 | sed -n 's,^ ,,p' | xargs ls - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.9 - name: Set julia python run: | echo "PYTHON=$(which python3)" >> $GITHUB_ENV + echo "PYCALL_JL_RUNTIME_PYTHON=$(which python3)" >> $GITHUB_ENV python3 -m pip install devito[tests,extras]@git+https://github.com/devitocodes/devito.git - PYTHON=$(which python3) julia -e 'using Pkg;Pkg.add("PyCall");Pkg.build("PyCall")' + PYCALL_JL_RUNTIME_PYTHON=$(which python3) PYTHON=$(which python3) julia -e 'using Pkg;Pkg.add("PyCall");Pkg.build("PyCall")' - name: Build JUDI uses: julia-actions/julia-buildpkg@latest + - name: Debug numpy path + run: | + julia -e 'using PyCall; np = pyimport("numpy"); @show np."__file__"' + - name: Run tests uses: julia-actions/julia-runtest@latest with: diff --git a/deps/build.jl b/deps/build.jl index 3a357ac6c..cc89bdb97 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -8,14 +8,14 @@ end pk = try pyimport("pkg_resources") catch e - run(PyCall.python_cmd(`-m pip install --user setuptools`)) + run(PyCall.python_cmd(`-m pip install -U --user --no-cache-dir setuptools`)) pyimport("pkg_resources") end ################## Devito ################## # pip command dvver = "4.8.10" -cmd = PyCall.python_cmd(`-m pip install --user devito\[extras,tests\]\>\=$(dvver)`) +cmd = PyCall.python_cmd(`-m pip install --user --no-cache-dir devito\[extras,tests\]\>\=$(dvver)`) try dv_ver = VersionNumber(split(pk.get_distribution("devito").version, "+")[1]) @@ -32,5 +32,5 @@ end try mpl = pyimport("matplotlib") catch e - run(PyCall.python_cmd(`-m pip install --user matplotlib`)) + run(PyCall.python_cmd(`-m pip install --user --no-cache-dir matplotlib`)) end