Skip to content

Commit 36852a6

Browse files
committed
Test on macos
1 parent c11bb16 commit 36852a6

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

.github/workflows/test.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ on:
55
workflow_dispatch:
66

77
env:
8-
COMMON_CMAKE_FLAGS: "-DZSTD_BUILD_PROGRAMS=OFF -DZSTD_LEGACY_SUPPORT=OFF -DZSTD_BUILD_STATIC=OFF -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_DICTBUILDER=OFF -DZSTD_BUILD_COMPRESSION=OFF"
8+
COMMON_CMAKE_FLAGS: "-DZSTD_BUILD_PROGRAMS=OFF -DZSTD_LEGACY_SUPPORT=OFF -DZSTD_BUILD_STATIC=OFF -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_DICTBUILDER=OFF -DZSTD_BUILD_COMPRESSION=OFF -DCMAKE_BUILD_TYPE=Debug"
99

1010
jobs:
1111
build:
1212
name: Build Zstd
13-
runs-on: ubuntu-latest
13+
runs-on: macos-latest
1414

1515
steps:
1616
- name: Clone zstd repo
@@ -23,23 +23,22 @@ jobs:
2323
shell: bash
2424
run: |
2525
cd build/cmake
26-
mkdir -p ../../output/x64
27-
mkdir build-x64
28-
cd build-x64
29-
cmake $COMMON_CMAKE_FLAGS ..
30-
cmake --build . -j 4
31-
cp lib/libzstd.so ../../../output/x64/libzstd.so
26+
mkdir build ../../output
27+
cd build
28+
cmake $COMMON_CMAKE_FLAGS "-DCMAKE_OSX_ARCHITECTURES=arm64;arm64e;x86_64;x86_64h" ..
29+
cmake --build . -j 4 --config Release
30+
cp lib/libzstd.dylib ../../../output/libzstd.dylib
3231
cd ..
3332
3433
- name: Publish Artifacts
3534
uses: actions/upload-artifact@v5
3635
with:
37-
name: zstd-ubuntu-latest
36+
name: zstd-macos-latest
3837
path: output
3938

4039
test:
4140
name: Test discord-zstd-java
42-
runs-on: ubuntu-latest
41+
runs-on: macos-latest
4342
needs: [build]
4443

4544
steps:
@@ -61,13 +60,13 @@ jobs:
6160
uses: actions/download-artifact@v5
6261
with:
6362
path: temp
64-
pattern: zstd-ubuntu-latest
63+
pattern: zstd-macos-latest
6564
merge-multiple: true
6665

6766
- name: Move Artifacts
6867
run: |
69-
mkdir -p natives/src/main/resources/natives/linux-x86-64
70-
cp temp/x64/libzstd.so natives/src/main/resources/natives/linux-x86-64/libzstd.so
68+
mkdir -p natives/src/main/resources/natives/darwin
69+
cp temp/libzstd.dylib natives/src/main/resources/natives/darwin/libzstd.dylib
7170
7271
- name: Run tests
7372
env:

0 commit comments

Comments
 (0)