-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added github action * applied tfussell/miniz-cpp#7
- Loading branch information
1 parent
58735c4
commit 4cb9797
Showing
5 changed files
with
143 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: libserum | ||
on: | ||
push: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build: | ||
name: Build libserum-${{ matrix.platform }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: windows-latest | ||
platform: win-x64 | ||
platform-name: x64 | ||
libserum: serum.dll | ||
- os: windows-latest | ||
platform: win-x86 | ||
platform-name: Win32 | ||
libserum: serum.dll | ||
- os: macos-latest | ||
platform: macOS-x64 | ||
libserum: libserum.dylib | ||
- os: macos-latest | ||
platform: macOS-arm64 | ||
libserum: libserum.dylib | ||
- os: ubuntu-latest | ||
platform: linux-x64 | ||
libserum: libserum.so | ||
- os: ubuntu-latest | ||
platform: android-arm64-v8a | ||
libserum: libserum.so | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build libserum-${{ matrix.platform }} | ||
run: | | ||
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then | ||
if [[ "${{ matrix.platform-name }}" == "Win32" ]]; then | ||
cmake -G "Visual Studio 17 2022" -A ${{ matrix.platform-name }} -B build -DUSE_WIN32=ON -DUSE_DLLEXPORTS=ON | ||
else | ||
cmake -G "Visual Studio 17 2022" -A ${{ matrix.platform-name }} -B build -DUSE_DLLEXPORTS=ON | ||
fi | ||
cmake --build build --config Release | ||
else | ||
if [[ "${{ matrix.os }}" == "macos-latest" ]]; then | ||
if [[ "${{ matrix.platform }}" == "macOS-arm64" ]]; then | ||
cmake -DCMAKE_BUILD_TYPE=Release -B build/Release -DUSE_OSXARM=ON | ||
else | ||
cmake -DCMAKE_BUILD_TYPE=Release -B build/Release -DUSE_OSXINTEL=ON | ||
fi | ||
else | ||
cmake -DCMAKE_BUILD_TYPE=Release -B build/Release | ||
fi | ||
cmake --build build/Release | ||
fi | ||
- run: | | ||
mkdir tmp | ||
cp build/Release/${{ matrix.libserum }} tmp | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: libserum-${{ matrix.platform }} | ||
path: tmp | ||
|
||
post-build: | ||
runs-on: macos-latest | ||
needs: [ build ] | ||
name: Build libserum-macOS | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
- run: | | ||
mkdir tmp | ||
lipo -create -output tmp/libserum.dylib \ | ||
libserum-macOS-x64/libserum.dylib \ | ||
libserum-macOS-arm64/libserum.dylib | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: libserum-macOS | ||
path: tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters