Release v0.2.0+traverse #16
Workflow file for this run
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
on: | |
release: | |
types: | |
- created | |
name: sdk | |
jobs: | |
android: | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
# ANDROID_NDK_LATEST_HOME is defined in the github ubuntu-latest runner. If this needs to be installed on a different image | |
# this can be done by running `sdkmanager "ndk;VERSION"` and setting `ANDROID_NDK_LATEST_HOME` to `$ANDROID_HOME/ndk/VERSION`. | |
TOOLCHAIN="$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64" | |
CLANG_VERSION="$(ls $TOOLCHAIN/lib/clang)" | |
CLANG="$TOOLCHAIN/lib/clang/$CLANG_VERSION" | |
NDK_VERSION=$(basename $ANDROID_NDK_LATEST_HOME) | |
echo "ANDROID_NDK_LATEST_HOME=$ANDROID_NDK_LATEST_HOME" | |
echo "ANDROID_NDK_VERSION=$NDK_VERSION" | |
echo "CLANG_VERSION=$CLANG_VERSION" | |
mkdir -p $NDK_VERSION && cd $NDK_VERSION | |
cp -r $TOOLCHAIN/sysroot/usr ./usr | |
cp -r $CLANG/lib/linux/aarch64/* ./usr/lib/aarch64-linux-android/ | |
cp -r $CLANG/lib/linux/arm/* ./usr/lib/arm-linux-androideabi/ | |
cp -r $CLANG/lib/linux/x86_64/* ./usr/lib/x86_64-linux-android/ | |
cp -r $CLANG/lib/linux/i386/* ./usr/lib/i686-linux-android/ | |
echo "INPUT(-lunwind)" > ./usr/lib/aarch64-linux-android/libgcc.a | |
echo "INPUT(-lunwind)" > ./usr/lib/arm-linux-androideabi/libgcc.a | |
echo "INPUT(-lunwind)" > ./usr/lib/x86_64-linux-android/libgcc.a | |
echo "INPUT(-lunwind)" > ./usr/lib/i686-linux-android/libgcc.a | |
- run: | | |
NDK_VERSION=$(basename $ANDROID_NDK_LATEST_HOME) | |
tar --zstd -cf Android.ndk.tar.zst $NDK_VERSION | |
- run: gh release upload $TAG Android.ndk.tar.zst -R Traverse-Research/xbuild | |
env: | |
GITHUB_TOKEN: ${{ secrets.XBUILD_SECRET }} | |
TAG: ${{ github.event.release.tag_name }} | |
macos: | |
runs-on: macos-11 | |
steps: | |
- run: ls /Applications/Xcode* | |
- run: cp -R $SDK_PATH . | |
env: | |
SDK_PATH: /Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk | |
- run: gtar --zstd -cf MacOSX.sdk.tar.zst MacOSX.sdk | |
- run: gh release upload $TAG MacOSX.sdk.tar.zst -R Traverse-Research/xbuild | |
env: | |
GITHUB_TOKEN: ${{ secrets.XBUILD_SECRET }} | |
TAG: ${{ github.event.release.tag_name }} | |
ios: | |
runs-on: macos-11 | |
steps: | |
- run: ls /Applications/Xcode* | |
- run: cp -R $SDK_PATH . | |
env: | |
SDK_PATH: /Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk | |
- run: gtar --zstd -cf iPhoneOS.sdk.tar.zst iPhoneOS.sdk | |
- run: gh release upload $TAG iPhoneOS.sdk.tar.zst -R Traverse-Research/xbuild | |
env: | |
GITHUB_TOKEN: ${{ secrets.XBUILD_SECRET }} | |
TAG: ${{ github.event.release.tag_name }} | |
windows: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install rust toolchain | |
uses: hecrj/setup-rust-action@v1 | |
- run: cargo install xwin | |
- run: xwin --accept-license splat --output Windows.sdk | |
- run: tar --zstd -cf Windows.sdk.tar.zst Windows.sdk | |
- run: gh release upload $TAG Windows.sdk.tar.zst -R Traverse-Research/xbuild | |
env: | |
GITHUB_TOKEN: ${{ secrets.XBUILD_SECRET }} | |
TAG: ${{ github.event.release.tag_name }} |