Skip to content

Commit

Permalink
all: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
fooker committed Oct 14, 2024
1 parent 4419cff commit d992a63
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 31 deletions.
58 changes: 31 additions & 27 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on: [ "push", "pull_request" ]
env:
CARGO_TERM_COLOR: always

permissions:
id-token: "write"
contents: "read"

jobs:
prepare:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -58,33 +62,33 @@ jobs:
runs-on: ubuntu-latest
needs: [ "check" ]
steps:
- uses: actions/checkout@v3

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Configure Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main

- name: Setup rust cache
uses: actions/cache@v3
with:
key: photonic-${{ hashFiles('**/Cargo.lock') }}
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- name: Build
run: |
nix develop --command \
cargo build --all --verbose
- name: Run tests
run: |
nix develop --command \
cargo test --all --verbose
- uses: actions/checkout@v3

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Configure Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main

- name: Setup rust cache
uses: actions/cache@v3
with:
key: photonic-${{ hashFiles('**/Cargo.lock') }}
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- name: Build
run: |
nix develop --command \
cargo build --all --verbose
- name: Run tests
run: |
nix develop --command \
cargo test --all --verbose
package:
runs-on: ubuntu-latest
Expand Down
6 changes: 2 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

crane = {
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
};

flake-utils.url = "github:numtide/flake-utils";
Expand All @@ -15,7 +14,6 @@
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};

Expand Down Expand Up @@ -49,12 +47,12 @@
nativeBuildInputs = with pkgs; [
pkg-config
protobuf
alsa-lib
lua5_4
];

buildInputs = with pkgs; [
openssl
alsa-lib
lua5_4
] ++ pkgs.lib.optionals pkgs.stdenv.isDarwin [
pkgs.libiconv
];
Expand Down

0 comments on commit d992a63

Please sign in to comment.