Skip to content

Commit

Permalink
ci: re-enable nix job build, add caching, refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
dvtfl committed Sep 4, 2024
1 parent 79ae56c commit a93d7ec
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 17 deletions.
10 changes: 10 additions & 0 deletions .github/actions/rust-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Setup Rust
description: Setup Rust environment in latest Ubuntu
steps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: sudo apt-get update; sudo apt-get install -y libdrm-dev libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libdbus-1-dev libsystemd-dev libseat-dev

39 changes: 22 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
name: "Build"
on:
pull_request:
branches:
workflow_dispatch:
pull_request:
branches:
- master
push:
branches:
branches:
- master
jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: cachix/install-nix-action@v22
# with:
# nix_path: nixpkgs=channel:nixpkgs-unstable
# - run: GIT_LFS_SKIP_SMUDGE=1 nix build
# - run: nix flake check
check-features:
runs-on: ubuntu-latest
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix flake check --print-build-logs --keep-going
check-no-default-features:
uses: ./.github/actions/rust-env
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: sudo apt-get update; sudo apt-get install -y libdrm-dev libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libdbus-1-dev libsystemd-dev libseat-dev
- run: cargo check --no-default-features
check-debug-feature:
uses: ./.github/actions/rust-env
steps:
- run: cargo check --features debug
check-profile-with-tracy-feature:
uses: ./.github/actions/rust-env
steps:
- run: cargo check --features profile-with-tracy

0 comments on commit a93d7ec

Please sign in to comment.