Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
johnyob committed Oct 12, 2023
1 parent c8917f4 commit 2813b2a
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 39 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/pull-request-nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build (Nix)

on:
pull_request:
push:
branches: [main]

jobs:
build-nix:
name: Build (Nix)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
with:
name: trilitech-jstz
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: Build
run: nix build

- name: Build Shell
run: nix develop --command bash -c "echo 'Hello World'"

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: kernel
path: result/lib
72 changes: 33 additions & 39 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,46 @@
name: Format and Build
name: Format, Lint & Build

on:
pull_request:
branches: [main]
push:
branches: [main]

jobs:
fmt:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
with:
name: trilitech-jstz
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: Format (rustfmt)
run: nix develop --command bash -c "make fmt-rust-check"

- name: Format (prettier)
run: nix develop --command bash -c "make fmt-js-check"

- name: Format (Nix)
run: nix develop --command bash -c "make fmt-nix-check"

build-nix:
name: Build `jstz_kernel` (Nix)
# fmt:
# name: Format
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# override: true
# components: rustfmt
# - uses: luisnquin/[email protected]

# - name: Format (rustfmt)
# run: make fmt-rust-check

# - name: Format (prettier)
# run: npx prettier --check .

# - name: Format (Nix)
# run: make fmt-nix-check

build:
name: Build `jstz_kernel`
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v20
- uses: actions-rs/toolchain@v1
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
profile: minimal
override: true
target: wasm32-unknown-unknown
- uses: KyleMayes/install-llvm-action@v1
with:
name: trilitech-jstz
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: Build `jstz_kernel`
run: nix build
version: 16.0.0
env: true

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: kernel
path: result/lib
- name: Build
run: make build

0 comments on commit 2813b2a

Please sign in to comment.