From fc06fa03adef174f7e60dd29b1ea30b1026a730b Mon Sep 17 00:00:00 2001 From: Oleksandr Khodos Date: Thu, 14 Mar 2024 12:12:41 +0200 Subject: [PATCH] Add MacOS Intel --- .github/workflows/github-dev-snap.yaml | 50 ++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/.github/workflows/github-dev-snap.yaml b/.github/workflows/github-dev-snap.yaml index 96903aaa14..8579eaa0a9 100644 --- a/.github/workflows/github-dev-snap.yaml +++ b/.github/workflows/github-dev-snap.yaml @@ -13,6 +13,7 @@ on: env: ARTIFACT_NAME: "artifact" ARTIFACT_NAME_2: "artifact_arm64" + ARTIFACT_NAME_3: "artifact_macos_intel" jobs: build_linux: @@ -30,13 +31,8 @@ jobs: ref: ${{ inputs.tag }} submodules: recursive - - name: Apply ccache - uses: hendrikmuhs/ccache-action@v1.2 - - name: Generate build files run: | - export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" - mkdir -p build/ cmake \ @@ -89,8 +85,44 @@ jobs: name: ${{ env.ARTIFACT_NAME_2 }} path: build/packager/libpackager.dylib + build_macos_intel: + name: MacOS Intel Build + runs-on: macos-13 + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ inputs.tag }} + submodules: recursive + + - name: Generate build files + run: | + mkdir -p build/ + + cmake \ + -DCMAKE_BUILD_TYPE="Release" \ + -DBUILD_SHARED_LIBS=1 \ + -DUSE_WORKAROUND_FOR_TRUN_VERSION_0=1 \ + -S . \ + -B build/ + + - name: Build + run: cmake --build build/ --parallel $(getconf _NPROCESSORS_ONLN) + + # Debug + - name: Display structure of built files + run: | + ls -la build/packager + cp build/packager/libpackager.dylib build/packager/libpackager-intel.dylib + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: ${{ env.ARTIFACT_NAME_3 }} + path: build/packager/libpackager-intel.dylib + update_release: - needs: [build_linux, build_macos_arm64] + needs: [build_linux, build_macos_arm64, build_macos_intel] name: Update release runs-on: ubuntu-latest steps: @@ -107,6 +139,11 @@ jobs: with: name: ${{ env.ARTIFACT_NAME_2 }} + - name: Download artifact 3 + uses: actions/download-artifact@v3 + with: + name: ${{ env.ARTIFACT_NAME_3 }} + # Debug - name: Display structure of downloaded files run: ls -la @@ -120,6 +157,7 @@ jobs: artifacts: | libpackager.so libpackager.dylib + libpackager-intel.dylib token: ${{ secrets.GITHUB_TOKEN }} omitBodyDuringUpdate: true omitNameDuringUpdate: true