Skip to content

Commit

Permalink
update CI to use ubuntu-latest; move apt step into a common script
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyscot committed Oct 28, 2024
1 parent ce878b6 commit 4fa0a8c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,32 @@ jobs:
build:
strategy:
matrix:
platform: [ubuntu-22.04]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Set minimal profile (Windows only)
if: matrix.platform == 'windows-latest'
run: rustup set profile minimal
#- name: Set minimal profile (Windows only)
# if: matrix.platform == 'windows-latest'
# run: rustup set profile minimal
- uses: Swatinem/rust-cache@v2
with:
key: "${{matrix.platform}}"
- name: install packages (ubuntu)
if: matrix.platform == 'ubuntu-22.04'
run: sudo apt-get update && sudo apt-get -y --no-install-recommends install mold capnproto
if: matrix.platform == 'ubuntu-latest'
run: scripts/install-ubuntu-packages
- name: Build
run: cargo build --locked

# We only need to run the checks on a single platform
checks:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
key: ubuntu-22.04
key: ubuntu-latest
- name: install packages
run: sudo apt-get update && sudo apt-get -y --no-install-recommends install mold capnproto
run: scripts/install-ubuntu-packates
# Checks begin here!
- run: cargo fmt --all -- --check
- run: cargo test --locked
Expand Down
5 changes: 5 additions & 0 deletions scripts/install-ubuntu-packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh -e

export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get -y --no-install-recommends install mold capnproto

0 comments on commit 4fa0a8c

Please sign in to comment.