Skip to content

Commit

Permalink
Try a mac build
Browse files Browse the repository at this point in the history
  • Loading branch information
mnightingale committed Oct 28, 2023
1 parent 207500b commit c9696aa
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,24 @@ jobs:
include:
- os: ubuntu-latest
platform: linux/amd64
- os: ubuntu-latest
platform: linux/arm64
# - os: ubuntu-latest
# platform: linux/arm64
- os: macos-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up QEMU
if: matrix.platform == 'linux/arm64'
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
if: matrix.os == 'ubuntu-latest'
uses: docker/setup-buildx-action@v3

- name: Build cross-compilation environment
if: matrix.os == 'ubuntu-latest'
uses: docker/build-push-action@v4
with:
context: .
Expand All @@ -36,13 +40,23 @@ jobs:
push: false

- name: Build with Docker
if: matrix.os == 'ubuntu-latest'
uses: addnab/docker-run-action@v3
with:
image: builder/${{ matrix.platform }}:latest
options: |
--platform ${{ matrix.platform }}
--volume ${{ github.workspace }}:/workspace
--workdir /workspace/rapidyenc
--workdir /workspace
run: |
cmake -B build .
cmake --build build --target rapidyenc_static
cmake -S rapidyenc -B rapidyenc/build \
-D CMAKE_BUILD_TYPE=Release
cmake --build rapidyenc/build --target rapidyenc_static -j$(sysctl -n hw.ncpu)
- name: Build native
if: matrix.os == 'macos-latest'
run: |
cmake -S rapidyenc -B rapidyenc/build \
-D CMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
-D CMAKE_BUILD_TYPE=Release
cmake --build rapidyenc/build --target rapidyenc_static -j$(sysctl -n hw.ncpu)

0 comments on commit c9696aa

Please sign in to comment.