Release Linux #6
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
| name: Release Linux | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: ${{ github.workflow }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-linux: | |
| strategy: | |
| matrix: | |
| include: | |
| - arch: x86_64 | |
| os: ubuntu-latest | |
| container: false | |
| artifacts: [null0_linux_x86-64.zip] | |
| - arch: arm64 | |
| os: ubuntu-24.04-arm64 | |
| container: false | |
| artifacts: [null0_linux_arm64.zip, null0_linux_drm_arm64.zip] | |
| # dropping for now, because it's very slow | |
| # - arch: armhf | |
| # os: ubuntu-latest | |
| # container: true | |
| # platform: linux/arm/v7 | |
| # image: arm32v7/ubuntu:24.04 | |
| # artifacts: [null0_linux_armhf.zip, null0_linux_drm_armhf.zip] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up QEMU (for armhf) | |
| if: matrix.container == true | |
| uses: docker/setup-qemu-action@v3 | |
| with: | |
| platforms: linux/arm | |
| - name: Build Native Linux Host (x86_64) | |
| if: matrix.container == false && matrix.arch == 'x86_64' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libwayland-dev libwayland-bin libxkbcommon-dev zip | |
| cmake -B build -DCMAKE_BUILD_TYPE=Release | |
| cmake --build build --target host | |
| cd build/host | |
| zip ../../null0_linux_x86-64.zip null0 | |
| - name: Build Native Linux Hosts (arm64) - X11/Wayland and DRM | |
| if: matrix.container == false && matrix.arch == 'arm64' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends curl git pkg-config cmake build-essential ninja-build zip \ | |
| libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libwayland-dev libwayland-bin libxkbcommon-dev \ | |
| libdrm-dev libgbm-dev libegl1-mesa-dev libgles2-mesa-dev libasound2-dev libudev-dev libinput-dev clang | |
| # Regular (desktop) build | |
| cmake -B build_desktop -G Ninja -DCMAKE_BUILD_TYPE=Release \ | |
| -DWAMR_BUILD_SIMD=0 -DWAMR_BUILD_INVOKE_NATIVE_GENERAL=1 \ | |
| -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \ | |
| -DCMAKE_C_FLAGS="-Wno-unknown-warning-option -Wno-unused-command-line-argument" \ | |
| -DCMAKE_CXX_FLAGS="-Wno-unknown-warning-option -Wno-unused-command-line-argument" | |
| cmake --build build_desktop --target host | |
| (cd build_desktop/host && zip ../../null0_linux_arm64.zip null0) | |
| # DRM build | |
| cmake -B build_drm -G Ninja -DCMAKE_BUILD_TYPE=Release \ | |
| -DPLATFORM=DRM -DGRAPHICS=GRAPHICS_API_OPENGL_ES2 \ | |
| -DWAMR_BUILD_SIMD=0 -DWAMR_BUILD_INVOKE_NATIVE_GENERAL=1 \ | |
| -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \ | |
| -DCMAKE_C_FLAGS="-Wno-unknown-warning-option -Wno-unused-command-line-argument" \ | |
| -DCMAKE_CXX_FLAGS="-Wno-unknown-warning-option -Wno-unused-command-line-argument" | |
| cmake --build build_drm --target host | |
| (cd build_drm/host && zip ../../null0_linux_drm_arm64.zip null0) | |
| - name: Build Linux Hosts in ARM container (armhf) - X11/Wayland and DRM | |
| if: matrix.container == true | |
| uses: addnab/docker-run-action@v3 | |
| with: | |
| image: ${{ matrix.image }} | |
| options: | | |
| --platform=${{ matrix.platform }} | |
| -v ${{ github.workspace }}:/work | |
| -w /work | |
| run: | | |
| set -e | |
| export DEBIAN_FRONTEND=noninteractive | |
| apt-get update | |
| apt-get install -y --no-install-recommends \ | |
| ca-certificates curl git pkg-config cmake clang clang-tools ninja-build build-essential zip \ | |
| libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libwayland-dev libwayland-bin libxkbcommon-dev \ | |
| libdrm-dev libgbm-dev libegl1-mesa-dev libgles2-mesa-dev libasound2-dev libudev-dev libinput-dev | |
| update-ca-certificates || true | |
| # Regular (desktop) build | |
| cmake -B build_desktop -G Ninja -DCMAKE_BUILD_TYPE=Release \ | |
| -DWAMR_BUILD_SIMD=0 -DWAMR_BUILD_INVOKE_NATIVE_GENERAL=1 \ | |
| -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \ | |
| -DCMAKE_C_FLAGS="-Wno-unknown-warning-option -Wno-unused-command-line-argument" \ | |
| -DCMAKE_CXX_FLAGS="-Wno-unknown-warning-option -Wno-unused-command-line-argument" | |
| cmake --build build_desktop --target host | |
| (cd build_desktop/host && zip ../../null0_linux_armhf.zip null0) | |
| # DRM build | |
| cmake -B build_drm -G Ninja -DCMAKE_BUILD_TYPE=Release \ | |
| -DPLATFORM=DRM -DGRAPHICS=GRAPHICS_API_OPENGL_ES2 \ | |
| -DWAMR_BUILD_SIMD=0 -DWAMR_BUILD_INVOKE_NATIVE_GENERAL=1 \ | |
| -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \ | |
| -DCMAKE_C_FLAGS="-Wno-unknown-warning-option -Wno-unused-command-line-argument" \ | |
| -DCMAKE_CXX_FLAGS="-Wno-unknown-warning-option -Wno-unused-command-line-argument" | |
| cmake --build build_drm --target host | |
| (cd build_drm/host && zip ../../null0_linux_drm_armhf.zip null0) | |
| - name: Upload assets to release | |
| run: gh release upload ${{ github.event.release.tag_name }} ${{ join(matrix.artifacts, ' ') }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} |