Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
28 changes: 18 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,10 @@ jobs:
backend:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v3

- name: 'Install Rust toolchain'
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: 'Install Protoc'
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: nicknovitski/nix-develop@v1

- name: 'Install linera-storage-service'
uses: taiki-e/cache-cargo-install-action@v2
Expand Down Expand Up @@ -60,6 +54,20 @@ jobs:
- name: 'Verify that code-generated files are unchanged'
run: git diff --exit-code

frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: nicknovitski/nix-develop@v1

- name: Build frontend
run: |
cd frontend
pnpm install
pnpm build

lint-cargo-fmt:
runs-on: ubuntu-latest
steps:
Expand Down
20 changes: 12 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,33 @@
inputsFrom = [
config.treefmt.build.devShell
];

buildInputs = with pkgs; [
# Frontend dependencies
nodejs
pnpm

# Rust toolchain from rust-toolchain.toml
(rust-bin.fromRustupToolchainFile ./rust-toolchain.toml)
# Build tools

# Linera dependencies
pkg-config
openssl
protobuf

clang
clang.cc.lib
libiconv

# Deployment tools
google-cloud-sdk

# Development tools
jq
];

shellHook = ''
export PATH=$PWD/target/debug:$PATH
export LIBCLANG_PATH="${pkgs.clang.cc.lib}/lib"
echo "Game of Life Challenge development environment"
echo "- Frontend: cd frontend && pnpm install && pnpm build"
echo "- Backend: cargo build"
Expand All @@ -66,4 +70,4 @@
};
};
};
}
}