From 355e610a55a31c42892c21e86497e6cd46817dfa Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Sat, 12 Oct 2024 12:42:11 +0200 Subject: [PATCH 1/4] Add osx dynamic tests --- .github/actions/setup-vcpkg/action.yml | 2 + .github/workflows/macos-dynamic.yml | 84 ++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 .github/workflows/macos-dynamic.yml diff --git a/.github/actions/setup-vcpkg/action.yml b/.github/actions/setup-vcpkg/action.yml index 5e09207f..e501c0b8 100644 --- a/.github/actions/setup-vcpkg/action.yml +++ b/.github/actions/setup-vcpkg/action.yml @@ -17,6 +17,8 @@ runs: run: | . <(curl https://aka.ms/vcpkg-init.sh -L) echo "PATH=$VCPKG_ROOT;$PATH" >> $GITHUB_ENV + # osx dynamic fix, bandaid until next vcpkg tool release + wget https://raw.githubusercontent.com/microsoft/vcpkg/9558037875497b9db8cf38fcd7db68ec661bffe7/scripts/cmake/z_vcpkg_fixup_rpath_macho.cmake -O ${VCPKG_ROOT}/scripts/cmake/z_vcpkg_fixup_rpath_macho.cmake - name: Setup vcpkg if: runner.os == 'Windows' diff --git a/.github/workflows/macos-dynamic.yml b/.github/workflows/macos-dynamic.yml new file mode 100644 index 00000000..159f2050 --- /dev/null +++ b/.github/workflows/macos-dynamic.yml @@ -0,0 +1,84 @@ +--- +name: 🍎 MacOS +on: + push: + branches: + - main + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + build: + permissions: + contents: read + packages: write + strategy: + matrix: + include: + - os: macos-13 + triplet: x64-osx-dynamic + - os: macos-14 + triplet: arm64-osx-dynamic + env: + buildtrees: /Users/runner/vcpkg-build + name: build (macos) + runs-on: ${{ matrix.os }} + + steps: + - name: 🐣 Checkout + uses: actions/checkout@v4 + + - name: 🐩 Install CMake and Ninja + uses: lukka/get-cmake@latest + + - name: 🧽 Developer Command Prompt for Microsoft Visual C++ + uses: ilammy/msvc-dev-cmd@v1 + + - name: 🔨 Prepare build env + run: | + brew install autoconf automake autoconf-archive libtool + + - name: 🐕 Checkout vcpkg + uses: actions/checkout@v4 + with: + repository: microsoft/vcpkg + ref: c4467cb686f92671f0172aa8299a77d908175b4e # TODO: can we have a canonical baseline for tests? + path: vcpkg + fetch-depth: 1 + + - name: 🐾 Bootstrap vcpkg + shell: bash + run: | + PKG_SOURCE_USER=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 1) + ./vcpkg/bootstrap-vcpkg.sh + NUGET_EXE=$(./vcpkg/vcpkg fetch nuget | grep '^\/.*nuget.exe$') + echo "Downloaded $NUGET_EXE" + mono $NUGET_EXE sources add -Name ghpkg -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json" -UserName "$PKG_SOURCE_USER" -Password "${{ secrets.GITHUB_TOKEN }}" -StorePasswordInClearText + mono $NUGET_EXE setapikey "${{ secrets.GITHUB_TOKEN }}" -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json" + echo "VCPKG_BINARY_SOURCES=clear;nuget,https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json,readwrite" >> $GITHUB_ENV + VCPKG_ROOT=$(pwd)/vcpkg + echo "PATH=$VCPKG_ROOT;$PATH" >> $GITHUB_ENV + echo "VCPKG_ROOT=$VCPKG_ROOT" >> $GITHUB_ENV + + - name: 🌋 Build + run: | + VCPKG_OPTIONS="--overlay-ports="${{ github.workspace }}/ports" --host-triplet=${{ matrix.triplet }} --triplet=${{ matrix.triplet }} --x-buildtrees-root=${{ env.buildtrees }}" + ./vcpkg/vcpkg install $VCPKG_OPTIONS py-pip + ./vcpkg/vcpkg install $VCPKG_OPTIONS py-sip + ./vcpkg/vcpkg install $VCPKG_OPTIONS py-numpy + ./vcpkg/vcpkg install $VCPKG_OPTIONS py-psycopg2 + ./vcpkg/vcpkg install $VCPKG_OPTIONS py-urllib3 + ./vcpkg/vcpkg install $VCPKG_OPTIONS py-markupsafe + ./vcpkg/vcpkg install $VCPKG_OPTIONS py-matplotlib + ./vcpkg/vcpkg install $VCPKG_OPTIONS py-requests + ./vcpkg/vcpkg install $VCPKG_OPTIONS py-pyqt6 + + - name: 📑 Upload logs + uses: actions/upload-artifact@v4 + if: failure() + with: + name: logs-${{ matrix.triplet }} + path: ${{ env.buildtrees }}/**/*.log From 826cf100f3eedf319713cd733b80525c2b4078d3 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Sat, 12 Oct 2024 13:08:36 +0200 Subject: [PATCH 2/4] rename --- .github/workflows/macos-dynamic.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos-dynamic.yml b/.github/workflows/macos-dynamic.yml index 159f2050..83fd315f 100644 --- a/.github/workflows/macos-dynamic.yml +++ b/.github/workflows/macos-dynamic.yml @@ -1,5 +1,5 @@ --- -name: 🍎 MacOS +name: 🍎 MacOS Dynamic on: push: branches: @@ -11,7 +11,7 @@ concurrency: cancel-in-progress: true jobs: - build: + build-osx-dynamic: permissions: contents: read packages: write From 132e8ec7b82630d4ba323c1f3fd9d8c300a96f11 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Sat, 12 Oct 2024 20:57:52 +0200 Subject: [PATCH 3/4] debug --- .github/workflows/macos-dynamic.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/macos-dynamic.yml b/.github/workflows/macos-dynamic.yml index 83fd315f..4f8c8061 100644 --- a/.github/workflows/macos-dynamic.yml +++ b/.github/workflows/macos-dynamic.yml @@ -76,6 +76,9 @@ jobs: ./vcpkg/vcpkg install $VCPKG_OPTIONS py-requests ./vcpkg/vcpkg install $VCPKG_OPTIONS py-pyqt6 + - uses: mxschmitt/action-tmate@v3 + if: always() + - name: 📑 Upload logs uses: actions/upload-artifact@v4 if: failure() From 54635101af61ffb134eaea260a7a22fdbf633668 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Sat, 12 Oct 2024 19:14:23 +0200 Subject: [PATCH 4/4] Bump baseline --- .github/workflows/macos-dynamic.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos-dynamic.yml b/.github/workflows/macos-dynamic.yml index 4f8c8061..bac1e5cb 100644 --- a/.github/workflows/macos-dynamic.yml +++ b/.github/workflows/macos-dynamic.yml @@ -45,7 +45,7 @@ jobs: uses: actions/checkout@v4 with: repository: microsoft/vcpkg - ref: c4467cb686f92671f0172aa8299a77d908175b4e # TODO: can we have a canonical baseline for tests? + ref: 9558037875497b9db8cf38fcd7db68ec661bffe7 # TODO: can we have a canonical baseline for tests? path: vcpkg fetch-depth: 1