Fix for macOS and CI improvements #126
This file contains hidden or 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
| #This file is kept almost identical to test-macos | |
| #We use two files in order to get two distinct badges for Linux and macOS. | |
| name: macOS | |
| on: | |
| - push | |
| - pull_request | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| jobs: | |
| test: | |
| name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: | |
| - '1.10' | |
| - '1' | |
| os: | |
| # - ubuntu-latest | |
| - macOS-latest | |
| arch: | |
| - aarch64 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - uses: julia-actions/setup-julia@latest | |
| with: | |
| version: ${{ matrix.version }} | |
| arch: ${{ matrix.arch }} | |
| - uses: julia-actions/cache@v2 | |
| - name: Cache ROOT install | |
| id: cache-root-install | |
| uses: actions/cache@v5 | |
| with: | |
| path: conda_for_rootjl | |
| key: ${{ runner.os }}-${{ matrix.arch }}-root-${{ hashFiles('.github/workflows/install_root_with_conda.sh')}} | |
| - name: Install ROOT | |
| if: steps.cache-root-install.outputs.cache-hit != 'true' | |
| run: | | |
| CONDA_BINDIR="`sh .github/workflows/install_root_with_conda.sh | tail -n 1`" | |
| source "$CONDA_BINDIR/activate" | |
| cat >> "$GITHUB_ENV" <<EOF | |
| PATH="$PATH" | |
| CXX="$CXX" | |
| EOF | |
| echo -n "ROOT binary: " 1>&2 | |
| which root 1>&2 | |
| - name: Build the Julia wrapper library | |
| run: | | |
| cd .. | |
| #for some reason in auto-compile mode, the compilation logs are not displayed when run in the CI. Use explicit compile call. | |
| julia --project=@. -e 'import Pkg; Pkg.add("ROOTprefs"); using ROOTprefs; ROOTprefs._set_preference("no_auto_compile", true); Pkg.add(path="./ROOT.jl"); import ROOT; ROOT.cxxcompile();' 1>&2 | |
| #trigger package precompilation | |
| julia --project=@. -e 'import ROOT' 1>&2 | |
| #- uses: julia-actions/julia-buildpkg@latest | |
| - name: Run package tests | |
| uses: julia-actions/julia-runtest@latest | |
| with: | |
| annotate: true |