From d64566f19eadd275438cfce31f2685bd1504271b Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Mon, 20 Jan 2025 08:05:53 -0700 Subject: [PATCH] CI: Add a nightly arm64 linux CI build This requires setting VCPKG_FORCE_SYSTEM_BINARIES to 1, per vcpkg documentation. --- .github/actions/setup/action.yml | 9 ++++++++ .github/workflows/lagom-template.yml | 11 ++++++--- .github/workflows/nightly-lagom.yml | 34 ++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/nightly-lagom.yml diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 860f2f96264..d3d7b607ad8 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -40,6 +40,8 @@ runs: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100 + # FIXME: https://github.com/WebAssembly/wabt/issues/2533 + # wabt doesn't have binary releases for arm64 Linux wget https://github.com/WebAssembly/wabt/releases/download/1.0.35/wabt-1.0.35-ubuntu-20.04.tar.gz tar -xzf ./wabt-1.0.35-ubuntu-20.04.tar.gz rm ./wabt-1.0.35-ubuntu-20.04.tar.gz @@ -59,6 +61,13 @@ runs: brew update brew install autoconf autoconf-archive automake bash ccache coreutils llvm@19 nasm ninja qt unzip wabt + - name: 'Set required environment variables' + if: ${{ inputs.os == 'Linux' && inputs.arch == 'arm64' }} + uses: actions/github-script@v7 + with: + script: | + core.exportVariable('VCPKG_FORCE_SYSTEM_BINARIES', '1') + - name: 'Install vcpkg' shell: bash run: ./Toolchain/BuildVcpkg.sh diff --git a/.github/workflows/lagom-template.yml b/.github/workflows/lagom-template.yml index beb13f2c451..7fc32ec59ae 100644 --- a/.github/workflows/lagom-template.yml +++ b/.github/workflows/lagom-template.yml @@ -82,7 +82,14 @@ jobs: echo "cmake_options=-DENABLE_CLANG_PLUGINS=ON" >> "$GITHUB_OUTPUT" else echo "ccache_key=${{ inputs.build_preset }}" >> "$GITHUB_OUTPUT" - echo "cmake_options=" >> "$GITHUB_OUTPUT" + if ${{ inputs.os_name == 'Linux' && inputs.arch == 'arm64' }} ; then + # FIXME: https://github.com/WebAssembly/wabt/issues/2533 + # wabt doesn't have binary releases for arm64 Linux + PKGCONFIG=$(which pkg-config) + echo "cmake_options=-DPKG_CONFIG_EXECUTABLE=$PKGCONFIG" >> "$GITHUB_OUTPUT" + else + echo "cmake_options=-DINCLUDE_WASM_SPEC_TESTS=ON -DWASM_SPEC_TEST_SKIP_FORMATTING=ON" >> "$GITHUB_OUTPUT" + fi fi - name: Restore Caches @@ -112,8 +119,6 @@ jobs: working-directory: ${{ github.workspace }} run: | cmake --preset ${{ inputs.build_preset }} -B Build \ - -DINCLUDE_WASM_SPEC_TESTS=ON \ - -DWASM_SPEC_TEST_SKIP_FORMATTING=ON \ ${{ steps.build-parameters.outputs.cmake_options }} \ -DPython3_EXECUTABLE=${{ env.pythonLocation }}/bin/python \ -DCMAKE_C_COMPILER=${{ steps.build-parameters.outputs.host_cc }} \ diff --git a/.github/workflows/nightly-lagom.yml b/.github/workflows/nightly-lagom.yml new file mode 100644 index 00000000000..43356b308f5 --- /dev/null +++ b/.github/workflows/nightly-lagom.yml @@ -0,0 +1,34 @@ +name: Nightly Lagom + +on: + # Automatically run at the end of every day. + schedule: + - cron: '0 0 * * *' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + # CI matrix - runs the job in lagom-template.yml with different configurations. + Lagom: + if: github.repository == 'LadybirdBrowser/ladybird' + + strategy: + fail-fast: false + matrix: + os_name: ['Linux'] + os: [ubuntu-24.04-arm] + arch: ['arm64'] + build_preset: ['Sanitizer_CI'] + toolchain: ['Clang'] + clang_plugins: [false] + + uses: ./.github/workflows/lagom-template.yml + with: + toolchain: ${{ matrix.toolchain }} + os_name: ${{ matrix.os_name }} + os: ${{ matrix.os }} + arch: ${{ matrix.arch }} + build_preset: ${{ matrix.build_preset }} + clang_plugins: ${{ matrix.clang_plugins }}