Skip to content

Commit

Permalink
Update CI (#143)
Browse files Browse the repository at this point in the history
* Update CI

* FAILURE

* Revert "FAILURE"

This reverts commit a3b0828.

* Docs

* Clippy

* Cache jobs separately

* Clippy fixes

* Add protoc back to ci jobs

* Fix docs

* Last clippy fix

* Speed up Free Space

* Optimize CI

* Turn on the rest of the jobs
  • Loading branch information
richardpringle authored Feb 8, 2024
1 parent d5e5a49 commit e726255
Show file tree
Hide file tree
Showing 32 changed files with 230 additions and 362 deletions.
45 changes: 0 additions & 45 deletions .github/workflows/byzantine.yml

This file was deleted.

152 changes: 152 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
name: ci

on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

permissions:
contents: write

jobs:
fmt:
runs-on: ubuntu-latest
steps:
- run: 'echo hello world'
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Checkout
uses: actions/checkout@v3
- name: Run static analysis tests
shell: bash
run: cargo fmt --all --check

docs:
runs-on: ubuntu-latest
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Checkout
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Run doc tests
run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features --document-private-items -p avalanche-consensus -p avalanche-types

clippy:
runs-on: ubuntu-latest
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Run static analysis tests
shell: bash
run: cargo clippy --all --all-features --tests --benches --examples -- -D warnings

unit:
name: unit tests
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
large-packages: false
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Run unit tests
run: cargo test --all-features -p avalanche-types -p avalanche-consensus

avalanchego-integration-tests:
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
large-packages: false
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.19'
- name: Run e2e tests
run: scripts/tests.avalanchego-e2e.sh

avalanchego-conformance-tests:
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
large-packages: false
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.19'
- name: Run e2e tests
run: scripts/tests.avalanchego-conformance.sh

avalanchego-byzantine-tests:
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
large-packages: false
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.19'
- name: Run e2e tests
run: scripts/tests.avalanchego-byzantine.sh
45 changes: 0 additions & 45 deletions .github/workflows/conformance.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/docs.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/e2e.yml

This file was deleted.

Loading

0 comments on commit e726255

Please sign in to comment.