Skip to content

Commit

Permalink
CI: Install pybind using brew, try to cache macports
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelSchneid3r committed Sep 26, 2023
1 parent 312c19f commit 3bbb1fe
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:

- name: Checkout recursive
uses: actions/checkout@v3
with:
submodules: 'recursive'
path: albert

- name: Create archives
run: |
tar --exclude=".*" -czvf ${{ github.ref_name }}.tar.gz albert
zip -r ${{ github.ref_name }}.zip albert -x "*/.*"
- name: Release
uses: softprops/action-gh-release@v1
with:
Expand All @@ -42,19 +45,36 @@ jobs:
runs-on: ${{ matrix.os }}

steps:

- name: Checkout source code
uses: actions/checkout@v3
with:
submodules: recursive

- name: Get latest CMake and ninja
uses: lukka/get-cmake@latest

- name: Install Qt dependencies
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_version }}
#cache: true
cache: true
modules: 'qtscxml qt5compat qtshadertools'
- name: Install macports (universal libraries)

- name: Install pybind using homebrew
run: brew install pybind11

- name: Try using macports cache
uses: actions/cache@v3
id: cache-macports # ref'ed below
with:
path: |
/opt/local/lib
/opt/local/include
key: ${{ runner.os }}-macports-r0

- name: Install macports (for universal binaries of libqalculate and libarchive)
if: steps.cache-macports.outputs.cache-hit != 'true'
run: |
case ${{ matrix.os }} in
macos-11)
Expand All @@ -71,13 +91,17 @@ jobs:
;;
esac
sudo sh -c 'echo "\n+universal" >> /opt/local/etc/macports/variants.conf'
- name: Install dependencies using macports
run : sudo /opt/local/bin/port install pybind11 libqalculate libarchive
if: steps.cache-macports.outputs.cache-hit != 'true'
run : sudo /opt/local/bin/port install libqalculate libarchive

- name: Build
run: |
cmake -S . -B build \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
cmake --build build
- name: Package
run: cd build && cpack -V
# - name: Upload
Expand All @@ -100,9 +124,11 @@ jobs:
dockerfile: [arch.Dockerfile, fedora.latest.Dockerfile, ubuntu.2204.Dockerfile]

steps:

- name: Checkout source code
uses: actions/checkout@v3
with:
submodules: recursive

- name: Build docker test image
run: docker build . --file .docker/${{ matrix.dockerfile }}

0 comments on commit 3bbb1fe

Please sign in to comment.