From 8e177453e87aa600cf4c908fab354ca6f3f6d353 Mon Sep 17 00:00:00 2001 From: Peter Urban Date: Mon, 30 Sep 2024 10:18:18 +0200 Subject: [PATCH] working on mac ci --- .github/workflows/ci-mac.yml | 72 +++++++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-mac.yml b/.github/workflows/ci-mac.yml index 10e6808..0b0b01f 100644 --- a/.github/workflows/ci-mac.yml +++ b/.github/workflows/ci-mac.yml @@ -100,7 +100,6 @@ jobs: - name: configure meson run: | BOOST_ROOT=${{ matrix.boost }} CXX=${{ matrix.llvm }}/bin/clang++ LDFLAGS="-L${{ matrix.llvm }}/lib/c++ -L${{ matrix.llvm }}/lib -L${{ matrix.boost }}/lib -undefined dynamic_lookup -Wl,-no_fixup_chains -Wl,-dead_strip -Wl,-rpath, ${{ matrix.llvm }}/lib/c++" CPPFLAGS="-I${{ matrix.llvm }}/include -I${{ matrix.boost }}/include" meson setup builddir/; meson configure builddir -Dpython.install_env=auto - - name: compile project run: meson compile -C builddir/ @@ -123,3 +122,74 @@ jobs: name: ${{matrix.container}}_testlog path: builddir/meson-logs/meson-log.txt retention-days: 5 + + macos_arm: + name: CI ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + boost: ["$(brew --prefix boost)"] + libomp: ["$(brew --prefix libomp)"] + llvm: ["$(brew --prefix llvm@18)"] + os: ["macos-15"] + + steps: + + - uses: actions/setup-python@v3 + with: + python-version: '3.12' + + # - name: Install LLVM and Clang + # uses: KyleMayes/install-llvm-action@v2 + # with: + # version: "18.1" + # env: true + + - name: checkout main repository + uses: actions/checkout@v4 + with: + submodules: recursive + lfs: false + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: super-ci-mac-2 # name for the cache + + - run: brew install libomp boost coreutils llvm@18 + + - run: pip install meson meson-python ninja pytest numpy + + # LDFLAGS="-L/opt/homebrew/opt/libomp/lib" CPPFLAGS="-I/opt/homebrew/opt/libomp/include" + - name: configure meson + run: | + meson setup builddir -Dpython.install_env=auto + # CXX=${{ matrix.llvm }}/bin/clang++ CC=${{ matrix.llvm }}/bin/clang \ + # LDFLAGS="-L${{ matrix.llvm }}/lib \ + # -L${{ matrix.llvm }}/lib/c++ \ + # -lunwind" \ + # meson setup builddir -Dpython.install_env=auto + + - name: compile project + run: meson compile -C builddir/ + + - name: test (cpp) + run: meson test -C builddir/ --print-errorlogs + + - name: install project + run: sudo meson install -C builddir/ + + - name: install pip requirements + run: pip install -r requirements.txt + + - name: test (pytest) + run: pytest -v + + - name: 'Upload error log' + uses: actions/upload-artifact@v4 + if: failure() + with: + name: ${{matrix.container}}_testlog + path: builddir/meson-logs/meson-log.txt + retention-days: 5 \ No newline at end of file