Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
more ci optimiazations
  • Loading branch information
eagr committed Nov 14, 2023
commit 6269ffdbaa7b135d238f0cd6eacf6bcd938989e4
45 changes: 10 additions & 35 deletions .github/workflows/rust-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ concurrency:

env:
RUST_BACKTRACE: 1
TOOLCHAIN_LINT: nightly
# pin nightly to avoid constantly throwing out cache
TOOLCHAIN_LINT: nightly-2023-11-13

jobs:
lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust ${{ env.TOOLCHAIN_LINT }}
Expand All @@ -26,8 +27,10 @@ jobs:
targets: wasm32-unknown-unknown
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
key: lint-v0
- name: cargo fmt
run: cargo +nightly fmt --all -- --check
run: cargo +${{ env.TOOLCHAIN_LINT }} fmt --all -- --check
- name: Install deps for musl build
run: |
sudo apt-get update
Expand All @@ -37,12 +40,12 @@ jobs:
uses: actions-rs-plus/clippy-check@v2
with:
toolchain: ${{ env.TOOLCHAIN_LINT }}
args: --all-targets --all-features --locked -- --deny warnings
args: --all-targets --all-features --locked --no-deps -- --deny warnings

test:
strategy:
matrix:
os: [ubuntu-20.04]
os: [ubuntu-latest]
toolchain: [stable]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -53,36 +56,6 @@ jobs:
toolchain: ${{ matrix.toolchain }}
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- name: Check disk space
run: df . -h
- name: Free disk space
run: |
sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true
sudo rm -rf \
/usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
/usr/lib/jvm || true
sudo apt install aptitude -y >/dev/null 2>&1
sudo aptitude purge aria2 ansible azure-cli shellcheck rpm xorriso zsync \
esl-erlang firefox gfortran-8 gfortran-9 google-chrome-stable \
google-cloud-sdk imagemagick \
libmagickcore-dev libmagickwand-dev libmagic-dev ant ant-optional kubectl \
mercurial apt-transport-https mono-complete libmysqlclient \
unixodbc-dev yarn chrpath libssl-dev libxft-dev \
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev \
snmp pollinate libpq-dev postgresql-client powershell ruby-full \
sphinxsearch subversion mongodb-org azure-cli microsoft-edge-stable \
-y -f >/dev/null 2>&1
sudo aptitude purge google-cloud-sdk -f -y >/dev/null 2>&1
sudo aptitude purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo apt purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo aptitude purge '~n ^mysql' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^php' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^dotnet' -f -y >/dev/null 2>&1
sudo apt-get autoremove -y >/dev/null 2>&1
sudo apt-get autoclean -y >/dev/null 2>&1
- name: Check disk space
run: df . -h
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
Expand All @@ -93,3 +66,5 @@ jobs:
run: cargo build --release -p try-runtime-cli
- name: cargo test
run: cargo test --release
- name: Check disk space
run: df . -h