From ca4d4c41fe242ff3063defd72653048fccb0fb83 Mon Sep 17 00:00:00 2001 From: ABeltramo Date: Sun, 18 Jun 2023 13:30:47 +0100 Subject: [PATCH] Fix Github Actions (#27) CI: testing ARM64 build --- .github/workflows/linux-build-test.yml | 64 ++++++++++++++++++++++-- docs/modules/dev/pages/manual_build.adoc | 4 +- 2 files changed, 63 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux-build-test.yml b/.github/workflows/linux-build-test.yml index 660f4027..9ef93652 100644 --- a/.github/workflows/linux-build-test.yml +++ b/.github/workflows/linux-build-test.yml @@ -12,6 +12,61 @@ on: - "docker" jobs: + test-arm: + timeout-minutes: 30 + runs-on: [ self-hosted, ARM64 ] # self-hosted, using Oracle free tier instance + steps: + - uses: actions/checkout@v3 + + - name: Prepare environment + run: | + sudo apt-get update -y + sudo apt-get install -y \ + g++-11 \ + cmake \ + ninja-build \ + libboost-locale-dev libboost-thread-dev libboost-filesystem-dev libboost-log-dev libboost-stacktrace-dev \ + libssl-dev \ + libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ + libwayland-dev libwayland-server0 libinput-dev libxkbcommon-dev libgbm-dev \ + libcurl4-openssl-dev \ + libpulse-dev \ + libevdev-dev \ + libudev-dev \ + libdrm-dev \ + libpci-dev + + - name: Setup Rust + uses: ATiltedTree/setup-rust@v1 + with: + rust-version: stable + + - name: Configure build + working-directory: ${{runner.workspace}} + env: + CXX: g++-11 + run: | + cmake -Bbuild \ + -H$GITHUB_WORKSPACE \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_CXX_EXTENSIONS=OFF \ + -DCMAKE_CXX_STANDARD=17 \ + -DTEST_UINPUT=ON \ + -DTEST_DOCKER=ON \ + -DLINK_RUST_WAYLAND=ON \ + -DTEST_RUST_WAYLAND=OFF \ + -DTEST_NVIDIA=OFF \ + -DCARGO_TARGET_BUILD=aarch64-unknown-linux-gnu \ + -G Ninja + + - name: Build tests + lib + working-directory: ${{runner.workspace}}/build + run: ninja -j 4 wolftests + + - name: Run tests + working-directory: ${{runner.workspace}}/build/tests + run: ./wolftests + test: runs-on: ubuntu-22.04 strategy: @@ -72,11 +127,12 @@ jobs: # Note: $GITHUB_WORKSPACE is distinct from ${{runner.workspace}}. # This is important run: | - cmake -Bbuild -H$GITHUB_WORKSPACE \ - -DBUILD_SHARED_LIBS=${{ matrix.shared }} \ - -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ - -DCMAKE_CXX_STANDARD=${{matrix.std}} \ + cmake -Bbuild \ + -H$GITHUB_WORKSPACE \ + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ + -DCMAKE_CXX_STANDARD=${{ matrix.std }} \ -DCMAKE_CXX_EXTENSIONS=OFF \ + -DBUILD_SHARED_LIBS=${{ matrix.shared }} \ -DCATCH_DEVELOPMENT_BUILD=ON \ -DTEST_UINPUT=OFF \ -DTEST_DOCKER=OFF \ diff --git a/docs/modules/dev/pages/manual_build.adoc b/docs/modules/dev/pages/manual_build.adoc index 516a722f..e995789a 100644 --- a/docs/modules/dev/pages/manual_build.adoc +++ b/docs/modules/dev/pages/manual_build.adoc @@ -3,9 +3,11 @@ .Build dependencies [source,bash] .... -apt install -y ninja-build cmake clang libboost-locale-dev libboost-thread-dev libboost-filesystem-dev libboost-log-dev libboost-stacktrace-dev libssl-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libevdev-dev libdrm-dev libpci-dev +apt install -y git ninja-build cmake clang libboost-locale-dev libboost-thread-dev libboost-filesystem-dev libboost-log-dev libboost-stacktrace-dev libssl-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libevdev-dev libdrm-dev libpci-dev libinput-dev libxkbcommon-dev libgbm-dev libpulse-dev libcurl4-openssl-dev .... +Install Rust following the https://www.rust-lang.org/tools/install[official docs] or avoid building our custom compositor by passing `-DLINK_RUST_WAYLAND=OFF` to cmake. + .Compile [source,bash] ....