From 7297d013f9819533ff8247943e884c04b8837640 Mon Sep 17 00:00:00 2001 From: Nuno Leiria Date: Fri, 18 Aug 2023 00:04:36 +0200 Subject: [PATCH] Move all CI steps to uniformly run on ubuntu-22.04, not ubuntu-20.04 or latest. Stop using latest mesa drivers that can be incompatible with the current OS version. Add libraries that make it easier to run actions locally with act. --- .github/workflows/ci.yml | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ef09d359e..4619b8927c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ env: jobs: clippy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 @@ -37,7 +37,7 @@ jobs: command: clippy args: --workspace --examples --tests clippy-web: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 @@ -56,7 +56,7 @@ jobs: run: cargo clippy --workspace test-linux: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Free up disk space run: | @@ -93,7 +93,7 @@ jobs: run: tree --du -h target build-api-and-doc: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 @@ -104,7 +104,7 @@ jobs: run: cargo run -p campfire --no-default-features example check-all build-web: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 @@ -137,23 +137,23 @@ jobs: include: - os: macos-latest - os: windows-latest - - os: ubuntu-20.04 + - os: ubuntu-22.04 runs-on: ${{ matrix.os }} steps: - name: Free up disk space - if: ${{ matrix.os == 'ubuntu-20.04' }} + if: ${{ matrix.os == 'ubuntu-22.04' }} run: | sudo rm -rf /usr/share/dotnet sudo rm -rf /opt/ghc sudo rm -rf "/usr/local/share/boost" sudo rm -rf "$AGENT_TOOLSDIRECTORY" - name: Install build dependencies - if: ${{ matrix.os == 'ubuntu-20.04' }} + if: ${{ matrix.os == 'ubuntu-22.04' }} run: | sudo apt-get update sudo apt-get install --no-install-recommends -y tree libasound2-dev libglib2.0-dev libxcb-shape0-dev libxcb-xfixes0-dev \ - libcairo-dev libgtk2.0-dev libsoup2.4-dev libgtk-3-dev libwebkit2gtk-4.0-dev xorg-dev ninja-build libxcb-render0-dev + libcairo-dev libgtk2.0-dev libsoup2.4-dev libgtk-3-dev libwebkit2gtk-4.0-dev xorg-dev ninja-build libxcb-render0-dev clang nodejs - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable - uses: Leafwing-Studios/cargo-cache@v1 @@ -178,7 +178,7 @@ jobs: include: - os: macos-latest - os: windows-latest - - os: ubuntu-20.04 + - os: ubuntu-22.04 runs-on: ${{ matrix.os }} steps: @@ -193,9 +193,7 @@ jobs: golden-image-tests: needs: build - # Note: we must use a newer Ubuntu for golden image tests, because older - # llvmpipe versions can randomly fail. - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 env: RUST_LOG: ambient_gpu=info steps: @@ -205,13 +203,12 @@ jobs: - name: Download ambient executable uses: actions/download-artifact@v3 with: - name: ambient-ubuntu-20.04 + name: ambient-ubuntu-22.04 - run: chmod a+x ambient - name: Install run (headless) dependencies run: | - sudo add-apt-repository ppa:oibaf/graphics-drivers -y sudo apt-get update - sudo apt install -y libxcb-xfixes0-dev mesa-vulkan-drivers + sudo apt install -y libxcb-xfixes0-dev vulkan-validationlayers-dev mesa-vulkan-drivers libasound2-dev - name: Run golden image tests run: cargo campfire-slim golden-images --ambient-path=./ambient check @@ -232,7 +229,7 @@ jobs: # We run out of storage space when trying to build and run the package on Windows. # It would be nice to fix this at some point. # - os: windows-latest - - os: ubuntu-20.04 + - os: ubuntu-22.04 runs-on: ${{ matrix.os }} steps: