Workflow file for this run
This file contains hidden or 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: | |
| - published | |
| jobs: | |
| build-windows-x86_64: | |
| name: Build on Windows X86_64 (MSVC) | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup MSVC | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x64 | |
| - name: Install xmake | |
| uses: xmake-io/github-action-setup-xmake@v1 | |
| - name: Build BinaryStream Static (Release) | |
| run: | | |
| xmake f --mode=release --kind=static | |
| xmake --all | |
| - name: Build BinaryStream Shared (Release) | |
| run: | | |
| xmake f --mode=release --kind=shared | |
| xmake --all | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: BinaryStream-windows-x86_64-${{ github.sha }} | |
| path: artifacts/BinaryStream-windows-x86_64.zip | |
| build-windows-arm64: | |
| name: Build on Windows ARM64 (MSVC) | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup MSVC | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: arm64 | |
| - name: Install xmake | |
| uses: xmake-io/github-action-setup-xmake@v1 | |
| - name: Build BinaryStream Static (Release) | |
| run: | | |
| xmake f --mode=release --arch=arm64 --kind=static | |
| xmake --all | |
| - name: Build BinaryStream Shared (Release) | |
| run: | | |
| xmake f --mode=release --arch=arm64 --kind=shared | |
| xmake --all | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: BinaryStream-windows-arm64-${{ github.sha }} | |
| path: artifacts/BinaryStream-windows-arm64.zip | |
| build-linux-x86_64: | |
| name: Build on Linux X86_64 (GCC) | |
| runs-on: ubuntu-24.04 | |
| container: | |
| image: ubuntu:22.04 | |
| options: --privileged | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup GCC 13 | |
| run: | | |
| ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime | |
| echo "Etc/UTC" > /etc/timezone | |
| apt-get update -y | |
| DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata | |
| apt-get install -y wget gnupg build-essential lsb-release software-properties-common zip git | |
| add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
| apt-get update -y | |
| apt-get install -y --no-install-recommends gcc-13 g++-13 | |
| update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 | |
| update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100 | |
| - name: Install xmake | |
| uses: xmake-io/github-action-setup-xmake@v1 | |
| - name: Build BinaryStream Static (Debug) | |
| run: | | |
| xmake f --mode=debug --kind=static --root | |
| xmake --all --root | |
| - name: Build BinaryStream Shared (Debug) | |
| run: | | |
| xmake f --mode=debug --kind=shared --root | |
| xmake --all --root | |
| - name: Build BinaryStream Static (Release) | |
| run: | | |
| xmake f --mode=release --kind=static --root | |
| xmake --all --root | |
| - name: Build BinaryStream Shared (Release) | |
| run: | | |
| xmake f --mode=release --kind=shared --root | |
| xmake --all --root | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: BinaryStream-linux-x86_64-${{ github.sha }} | |
| path: artifacts/BinaryStream-linux-x86_64.zip | |
| build-linux-arm64: | |
| name: Build on Linux ARM64 (GCC) | |
| runs-on: ubuntu-24.04 | |
| container: | |
| image: ubuntu:22.04 | |
| options: --privileged | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup GCC 13 | |
| run: | | |
| ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime | |
| echo "Etc/UTC" > /etc/timezone | |
| apt-get update -y | |
| DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata | |
| apt-get install -y wget gnupg build-essential lsb-release software-properties-common zip git | |
| add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
| apt-get update -y | |
| apt-get install -y --no-install-recommends gcc-13 g++-13 | |
| update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 | |
| update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100 | |
| apt-get update -y | |
| apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu | |
| - name: Install xmake | |
| uses: xmake-io/github-action-setup-xmake@v1 | |
| - name: Build BinaryStream Static (Debug) | |
| run: | | |
| xmake f --mode=debug --kind=static --arch=arm64 --sdk=/usr/aarch64-linux-gnu --bin=/usr/bin --cc=aarch64-linux-gnu-gcc --cxx=aarch64-linux-gnu-g++ --ld=aarch64-linux-gnu-g++ --sh=aarch64-linux-gnu-g++ --root | |
| xmake --all --root | |
| - name: Build BinaryStream Shared (Debug) | |
| run: | | |
| xmake f --mode=debug --kind=shared --arch=arm64 --sdk=/usr/aarch64-linux-gnu --bin=/usr/bin --cc=aarch64-linux-gnu-gcc --cxx=aarch64-linux-gnu-g++ --ld=aarch64-linux-gnu-g++ --sh=aarch64-linux-gnu-g++ --root | |
| xmake --all --root | |
| - name: Build BinaryStream Static (Release) | |
| run: | | |
| xmake f --mode=release --kind=static --arch=arm64 --sdk=/usr/aarch64-linux-gnu --bin=/usr/bin --cc=aarch64-linux-gnu-gcc --cxx=aarch64-linux-gnu-g++ --ld=aarch64-linux-gnu-g++ --sh=aarch64-linux-gnu-g++ --root | |
| xmake --all --root | |
| - name: Build BinaryStream Shared (Release) | |
| run: | | |
| xmake f --mode=release --kind=shared --arch=arm64 --sdk=/usr/aarch64-linux-gnu --bin=/usr/bin --cc=aarch64-linux-gnu-gcc --cxx=aarch64-linux-gnu-g++ --ld=aarch64-linux-gnu-g++ --sh=aarch64-linux-gnu-g++ --root | |
| xmake --all --root | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: BinaryStream-linux-arm64-${{ github.sha }} | |
| path: artifacts/BinaryStream-linux-arm64.zip | |
| build-macos-x86_64: | |
| name: Build on MacOS X86_64 (Clang) | |
| runs-on: macos-14 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install xmake | |
| uses: xmake-io/github-action-setup-xmake@v1 | |
| - name: Build BinaryStream Static (Release) | |
| run: | | |
| xmake f --mode=release --arch=x86_64 --kind=static | |
| xmake --all | |
| - name: Build BinaryStream Shared (Release) | |
| run: | | |
| xmake f --mode=release --arch=x86_64 --kind=shared | |
| xmake --all | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: BinaryStream-macosx-x86_64-${{ github.sha }} | |
| path: artifacts/BinaryStream-macosx-x86_64.zip | |
| build-macos-arm64: | |
| name: Build on MacOS ARM64 (Clang) | |
| runs-on: macos-14 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install xmake | |
| uses: xmake-io/github-action-setup-xmake@v1 | |
| - name: Build BinaryStream Static (Release) | |
| run: | | |
| xmake f --mode=release --kind=static | |
| xmake --all | |
| - name: Build BinaryStream Shared (Release) | |
| run: | | |
| xmake f --mode=release --kind=shared | |
| xmake --all | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: BinaryStream-macosx-arm64-${{ github.sha }} | |
| path: artifacts/BinaryStream-macosx-arm64.zip | |
| build-android-x86_64: | |
| name: Build on Android X86_64 (Clang) | |
| runs-on: ubuntu-24.04 | |
| container: | |
| image: ubuntu:24.04 | |
| options: --privileged | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Android NDK | |
| run: | | |
| apt-get update -y | |
| apt-get install -y wget gnupg build-essential lsb-release software-properties-common zip git | |
| wget https://dl.google.com/android/repository/android-ndk-r26b-linux.zip | |
| unzip android-ndk-r26b-linux.zip -d $HOME/ | |
| - name: Install xmake | |
| uses: xmake-io/github-action-setup-xmake@v1 | |
| - name: Build BinaryStream Static (Release) | |
| run: | | |
| xmake f --mode=debug --plat=android --arch=x86_64 --kind=static --ndk=$HOME/android-ndk-r26b --bin=$HOME/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/bin --cxxflags="--target=x86_64-linux-android31 --sysroot=$HOME/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/sysroot -nostdinc++ -isystem $HOME/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1" --shflags="--target=x86_64-linux-android31 --sysroot=$HOME/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/sysroot" --root | |
| xmake --all --root | |
| - name: Build BinaryStream Shared (Release) | |
| run: | | |
| xmake f --mode=release --plat=android --arch=x86_64 --kind=shared --ndk=$HOME/android-ndk-r26b --bin=$HOME/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/bin --cxxflags="--target=x86_64-linux-android31 --sysroot=$HOME/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/sysroot -nostdinc++ -isystem $HOME/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1" --shflags="--target=x86_64-linux-android31 --sysroot=$HOME/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/sysroot" --root | |
| xmake --all --root | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: BinaryStream-android-x86_64-${{ github.sha }} | |
| path: artifacts/BinaryStream-android-x86_64.zip | |
| build-android-arm64: | |
| name: Build on Android ARM64 (Clang) | |
| runs-on: ubuntu-24.04 | |
| container: | |
| image: ubuntu:24.04 | |
| options: --privileged | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Android NDK | |
| run: | | |
| apt-get update -y | |
| apt-get install -y wget gnupg build-essential lsb-release software-properties-common zip git | |
| wget https://dl.google.com/android/repository/android-ndk-r26b-linux.zip | |
| unzip android-ndk-r26b-linux.zip -d $HOME/ | |
| - name: Install xmake | |
| uses: xmake-io/github-action-setup-xmake@v1 | |
| - name: Build BinaryStream Static (Release) | |
| run: | | |
| xmake f --mode=debug --plat=android --arch=arm64-v8a --kind=static --ndk=$HOME/android-ndk-r26b --bin=$HOME/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/bin --cxxflags="--target=aarch64-linux-android31 --sysroot=$HOME/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/sysroot -nostdinc++ -isystem $HOME/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1" --shflags="--target=aarch64-linux-android31 --sysroot=$HOME/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/sysroot" --root | |
| xmake --all --root | |
| - name: Build BinaryStream Shared (Release) | |
| run: | | |
| xmake f --mode=release --plat=android --arch=arm64-v8a --kind=shared --ndk=$HOME/android-ndk-r26b --bin=$HOME/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/bin --cxxflags="--target=aarch64-linux-android31 --sysroot=$HOME/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/sysroot -nostdinc++ -isystem $HOME/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1" --shflags="--target=aarch64-linux-android31 --sysroot=$HOME/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/sysroot" --root | |
| xmake --all --root | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: BinaryStream-android-arm64-v8a-${{ github.sha }} | |
| path: artifacts/BinaryStream-android-arm64-v8a.zip | |
| upload-to-release: | |
| name: Publish Release | |
| needs: | |
| - build-windows-x86_64 | |
| - build-windows-arm64 | |
| - build-linux-x86_64 | |
| - build-linux-arm64 | |
| - build-macos-x86_64 | |
| - build-macos-arm64 | |
| - build-android-x86_64 | |
| - build-android-arm64 | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: BinaryStream-windows-x86_64-${{ github.sha }} | |
| path: artifact | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: BinaryStream-windows-arm64-${{ github.sha }} | |
| path: artifact | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: BinaryStream-linux-x86_64-${{ github.sha }} | |
| path: artifact | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: BinaryStream-linux-arm64-${{ github.sha }} | |
| path: artifact | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: BinaryStream-macosx-x86_64-${{ github.sha }} | |
| path: artifact | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: BinaryStream-macosx-arm64-${{ github.sha }} | |
| path: artifact | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: BinaryStream-android-x86_64-${{ github.sha }} | |
| path: artifact | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: BinaryStream-android-arm64-v8a-${{ github.sha }} | |
| path: artifact | |
| - uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| artifact/* |