Skip to content

Commit

Permalink
Add CI testing for the build
Browse files Browse the repository at this point in the history
  • Loading branch information
Twey committed May 20, 2024
1 parent 21bb012 commit 0811be2
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
use flake
use flake '.?submodules=1'
51 changes: 51 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build

on:
push:
branches: [ main ]
pull_request:
branches:
- "**"
paths-ignore:
- '*.md'
workflow_dispatch:

# This allows a subsequently queued workflow run to interrupt previous runs on pull-requests
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.run_id }}'
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
# We allow redundant explicit links because `cargo rdme` doesn't know how to resolve implicit intra-crate links.
RUSTDOCFLAGS: -A rustdoc::redundant_explicit_links -D warnings
# We will re-enable this once the client worker builds without warnings.
# RUSTFLAGS: -D warnings
RUSTUP_MAX_RETRIES: 10
RUST_LOG: warn

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: cachix/install-nix-action@v26
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build the client worker
run: |
cd client-worker
nix develop '.?submodules=1' --override-input linera-protocol ../linera-protocol --command wasm-pack build --target web
- name: Build the extension
run: |
cd extension
nix develop --override-input linera-protocol ../linera-protocol --command pnpm install
nix develop --override-input linera-protocol ../linera-protocol --command pnpm build
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "linera-protocol"]
path = linera-protocol
url = [email protected]:linera-io/linera-protocol
url = [email protected]:Twey/linera-protocol
13 changes: 5 additions & 8 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
systems.url = "github:nix-systems/default";
linera-protocol = {
type = "git";
url = "file:linera-protocol?shallow=1&submodules=1";
};
linera-protocol.url = "path:linera-protocol";
};

outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } {
Expand Down

0 comments on commit 0811be2

Please sign in to comment.