Skip to content

Commit

Permalink
Add MacOS Intel
Browse files Browse the repository at this point in the history
  • Loading branch information
jedekar committed Mar 14, 2024
1 parent 3d13ca8 commit fc06fa0
Showing 1 changed file with 44 additions and 6 deletions.
50 changes: 44 additions & 6 deletions .github/workflows/github-dev-snap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
env:
ARTIFACT_NAME: "artifact"
ARTIFACT_NAME_2: "artifact_arm64"
ARTIFACT_NAME_3: "artifact_macos_intel"

jobs:
build_linux:
Expand All @@ -30,13 +31,8 @@ jobs:
ref: ${{ inputs.tag }}
submodules: recursive

- name: Apply ccache
uses: hendrikmuhs/[email protected]

- name: Generate build files
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
mkdir -p build/
cmake \
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -120,6 +157,7 @@ jobs:
artifacts: |
libpackager.so
libpackager.dylib
libpackager-intel.dylib
token: ${{ secrets.GITHUB_TOKEN }}
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
Expand Down

0 comments on commit fc06fa0

Please sign in to comment.