| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- name: build dylib
- on: [push, pull_request]
- jobs:
- build_win:
- runs-on: windows-latest
- steps:
- - uses: actions/checkout@v3
- - uses: ilammy/msvc-dev-cmd@v1
- - name: Compile
- shell: powershell
- run: |
- Invoke-Expression (Invoke-Webrequest 'https://xmake.io/psget.text' -UseBasicParsing).Content
- mkdir -p output/windows/x86_64
- xmake f -y -p windows -a x64
- xmake build test
- cp build/windows/x64/release/test.dll output/windows/x86_64
- - uses: actions/upload-artifact@v3
- with:
- path: output
- build_linux_android:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - name: Install xmake
- run: |
- wget https://xmake.io/shget.text -O - | bash
- xmake --version
- - name: Compile linux
- run: |
- mkdir -p output/linux/x86_64
- xmake f -y -p linux -a x86_64
- xmake build test
- cp build/linux/x86_64/release/libtest.so output/linux/x86_64
- - uses: android-actions/setup-android@v2
- - uses: nttld/setup-ndk@v1
- id: setup-ndk
- with:
- ndk-version: r25b
- add-to-path: false
- local-cache: true
- - name: Compile android
- run: |
- mkdir -p output/android/armeabi-v7a
- mkdir -p output/android/arm64-v8a
- xmake f -y -p android -a armeabi-v7a --ndk=$ANDROID_NDK_HOME
- xmake build test
- cp build/android/armeabi-v7a/release/libtest.so output/android/armeabi-v7a
- xmake f -y -p android -a arm64-v8a --ndk=$ANDROID_NDK_HOME
- xmake build test
- cp build/android/arm64-v8a/release/libtest.so output/android/arm64-v8a
- env:
- ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- - uses: actions/upload-artifact@v3
- with:
- path: output
- build_macos:
- runs-on: macos-latest
- steps:
- - uses: actions/checkout@v3
- - name: Install xmake
- run: |
- wget https://xmake.io/shget.text -O - | bash
- source ~/.xmake/profile
- xmake --version
- - name: Compile
- run: |
- source ~/.xmake/profile
- mkdir -p output/macos/x86_64
- xmake f -y -p macosx -a x86_64
- xmake build test
- cp build/macosx/x86_64/release/libtest.dylib output/macos/x86_64
- - uses: actions/upload-artifact@v3
- with:
- path: output
|