Skip to content

Commit

Permalink
Move all CI steps to uniformly run on ubuntu-22.04, not ubuntu-20.04 …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
Pombal committed Aug 17, 2023
1 parent 424387a commit 7297d01
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:

jobs:
clippy:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
Expand All @@ -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
Expand All @@ -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: |
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 7297d01

Please sign in to comment.