Skip to content

Commit

Permalink
Build overhaul
Browse files Browse the repository at this point in the history
.
  • Loading branch information
Ancient123 committed Oct 12, 2023
1 parent b5c6026 commit aa42495
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 35 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Run Cargo Audit

on:
push:
branches:
- 'main'
schedule:
- cron: '0 0 * * 1' # Run on Mondays
workflow_dispatch:
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,32 @@ on:
- 'benchmarking_*'
- 'main'
pull_request:
branches:
- 'main'
- '*/*'
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
just_variants:
- async_std
- tokio
runs-on: ubuntu-latest

steps:
- uses: styfle/[email protected]
name: Cancel Outdated Builds
- name: Cancel Outdated Builds
uses: styfle/[email protected]
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v4
name: Checkout Repository
- name: Checkout Repository
uses: actions/checkout@v4

- uses: Swatinem/rust-cache@v2
name: Enable Rust Caching
- name: Enable Rust Caching
uses: Swatinem/rust-cache@v2

- name: Install dependencies
run: |
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/build_arm_nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
branches:
- 'main'
pull_request:
branches:
- 'main'
- '*/*'
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:
Expand Down Expand Up @@ -36,5 +33,4 @@ jobs:

# sanity check that repository builds with nix
- name: Build
run: |
nix develop -c just async_std build
run: nix develop -c just async_std build
6 changes: 6 additions & 0 deletions .github/workflows/build_nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ jobs:
- name: Install Nix
uses: cachix/install-nix-action@v23

- name: Nix Caching
uses: cachix/cachix-action@v12
with:
name: espresso-systems-private
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Checkout Repository
uses: actions/checkout@v4

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/careful.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ jobs:
- name: Install Nix
uses: cachix/install-nix-action@v23

- name: Nix Caching
uses: cachix/cachix-action@v12
with:
name: espresso-systems-private
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Checkout Repository
uses: actions/checkout@v4

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ jobs:
- name: Install Nix
uses: cachix/install-nix-action@v23

- name: Nix Caching
uses: cachix/cachix-action@v12
with:
name: espresso-systems-private
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Checkout Repository
uses: actions/checkout@v4

Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
branches:
- 'main'
pull_request:
branches:
- 'main'
- '*/*'
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:
Expand All @@ -16,8 +13,8 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 35
steps:
- uses: styfle/[email protected]
name: Cancel Outdated Builds
- name: Cancel Outdated Builds
uses: styfle/[email protected]
with:
all_but_latest: true
access_token: ${{ github.token }}
Expand All @@ -31,12 +28,11 @@ jobs:
sudo apt-get install -y protobuf-compiler
cargo install just
- uses: Swatinem/rust-cache@v2
name: Enable Rust Caching
- name: Enable Rust Caching
uses: Swatinem/rust-cache@v2

- name: Build Docs
run: |
just async_std doc
run: just async_std doc

- name: Create documentation
if: ${{ github.ref == 'refs/heads/main' }}
Expand Down
26 changes: 15 additions & 11 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,36 @@ on:
branches:
- 'main'
pull_request:
branches:
- 'main'
- '*/*'
workflow_dispatch:

jobs:
lints:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: styfle/[email protected]
name: Cancel Outdated Builds
- name: Cancel Outdated Builds
uses: styfle/[email protected]
with:
all_but_latest: true
access_token: ${{ github.token }}

- name: Install Nix
uses: cachix/install-nix-action@v23

- uses: actions/checkout@v4
name: Checkout Repository
- name: Nix Caching
uses: cachix/cachix-action@v12
with:
name: espresso-systems-private
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Checkout Repository
uses: actions/checkout@v4

- name: Format Check
run: cargo fmt -- --check

- name: Clippy
run: |
nix develop -c just async_std lint
nix develop -c just tokio lint
- name: Clippy async_std
run: nix develop -c just async_std lint

- name: Clippy tokio
run: nix develop -c just tokio lint
5 changes: 5 additions & 0 deletions .github/workflows/update_nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ jobs:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v12
with:
name: espresso-systems-private
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@v20
with:
Expand Down

0 comments on commit aa42495

Please sign in to comment.