Build Webify #1
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
| name: Build Webify | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| android: | |
| runs-on: macos-26 | |
| env: | |
| ZIG_TARGET: ${{ matrix.target }} | |
| strategy: | |
| matrix: | |
| target: [aarch64-windows-gnu, aarch64-linux-musl, aarch64-macos-none, x86_64-windows-gnu, x86_64-linux-musl, x86_64-macos-none, arm-linux-musleabihf, x86-windows-gnu, x86-linux-musl] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@main | |
| with: | |
| path: ${{ github.workspace }} | |
| submodules: true | |
| - name: Setup Zig | |
| uses: mlugg/setup-zig@main | |
| with: | |
| version: "0.17.0-dev.304+9787df942" | |
| use-cache: false | |
| - name: Setup Zig Toolchain | |
| run: git clone https://github.com/HomuHomu833/zig-as-llvm ${{ github.workspace }}/zig-as-llvm | |
| - name: Build Webify | |
| run: | | |
| TOOLCHAIN=${{ github.workspace }}/zig-as-llvm | |
| mkdir build | |
| cd build | |
| cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel \ | |
| -DCMAKE_C_FLAGS="-static" \ | |
| -DCMAKE_CXX_FLAGS="-static" \ | |
| -DCMAKE_EXE_LINKER_FLAGS="-static" \ | |
| -DCMAKE_C_COMPILER="${TOOLCHAIN}/bin/cc" \ | |
| -DCMAKE_CXX_COMPILER="${TOOLCHAIN}/bin/c++" \ | |
| -DCMAKE_ASM_COMPILER="${TOOLCHAIN}/bin/cc" \ | |
| -DCMAKE_LINKER="${TOOLCHAIN}/bin/ld" \ | |
| -DCMAKE_OBJCOPY="${TOOLCHAIN}/bin/objcopy" \ | |
| -DCMAKE_AR="${TOOLCHAIN}/bin/ar" \ | |
| -DCMAKE_RANLIB="${TOOLCHAIN}/bin/ranlib" \ | |
| -DCMAKE_STRIP="${TOOLCHAIN}/bin/strip" \ | |
| -DCMAKE_RC_COMPILER="${TOOLCHAIN}/bin/rc" | |
| cmake --build . --config MinSizeRel -j$(nproc) | |