-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added formal spec to Nix shell and CI #13
Changes from all commits
2ce38e3
e995c46
9f8769b
c6a97ec
056940d
3602469
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,12 +13,52 @@ on: | |
- main | ||
jobs: | ||
|
||
typecheck: | ||
name: Typecheck specification | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: 📥 Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: 💾 Cache Nix store | ||
uses: actions/[email protected] | ||
id: nix-cache | ||
with: | ||
path: /tmp/nixcache | ||
key: ${{ runner.os }}-nix-typecheck-${{ hashFiles('flake.lock') }} | ||
restore-keys: ${{ runner.os }}-nix-typecheck- | ||
- name: 🛠️ Install Nix | ||
uses: cachix/install-nix-action@v21 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
install_url: https://releases.nixos.org/nix/nix-2.10.3/install | ||
extra_nix_config: | | ||
allowed-uris = ${{ env.ALLOWED_URIS }} | ||
trusted-public-keys = ${{ env.TRUSTED_PUBLIC_KEYS }} | ||
substituters = ${{ env.SUBSTITUTERS }} | ||
experimental-features = nix-command flakes | ||
- name: 💾➤ Import Nix store cache | ||
if: "steps.nix-cache.outputs.cache-hit == 'true'" | ||
run: "nix-store --import < /tmp/nixcache" | ||
- name: 🏗️ Build specification | ||
run: | | ||
nix build --show-trace --accept-flake-config .#leiosSpec | ||
- name: ➤💾 Export Nix store cache | ||
if: "steps.nix-cache.outputs.cache-hit != 'true'" | ||
run: "nix-store --export $(find /nix/store -maxdepth 1 -name '*-*') > /tmp/nixcache" | ||
|
||
compile: | ||
name: Build libraries | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: 📥 Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: 💾 Cache Nix store | ||
uses: actions/[email protected] | ||
id: nix-cache | ||
with: | ||
path: /tmp/nixcache | ||
key: ${{ runner.os }}-nix-compile-${{ hashFiles('flake.lock') }} | ||
restore-keys: ${{ runner.os }}-nix-compile- | ||
- name: 🛠️ Install Nix | ||
uses: cachix/install-nix-action@v21 | ||
with: | ||
|
@@ -29,12 +69,18 @@ jobs: | |
trusted-public-keys = ${{ env.TRUSTED_PUBLIC_KEYS }} | ||
substituters = ${{ env.SUBSTITUTERS }} | ||
experimental-features = nix-command flakes | ||
- name: 💾➤ Import Nix store cache | ||
if: "steps.nix-cache.outputs.cache-hit == 'true'" | ||
run: "nix-store --import < /tmp/nixcache" | ||
- name: 🏗️ Build `exe:leios` | ||
run: | | ||
nix build --show-trace --accept-flake-config .#leios | ||
- name: 🏗️ Build `exe:ouroboros-net-vis` | ||
run: | | ||
nix build --show-trace --accept-flake-config .#ouroboros-net-vis | ||
- name: ➤💾 Export Nix store cache | ||
if: "steps.nix-cache.outputs.cache-hit != 'true'" | ||
run: "nix-store --export $(find /nix/store -maxdepth 1 -name '*-*') > /tmp/nixcache" | ||
|
||
tests: | ||
if: true | ||
|
@@ -43,6 +89,13 @@ jobs: | |
steps: | ||
- name: 📥 Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: 💾 Cache Nix store | ||
uses: actions/[email protected] | ||
id: nix-cache | ||
with: | ||
path: /tmp/nixcache | ||
key: ${{ runner.os }}-nix-tests-${{ hashFiles('flake.lock') }} | ||
restore-keys: ${{ runner.os }}-nix-tests- | ||
- name: 🛠️ Install Nix | ||
uses: cachix/install-nix-action@v21 | ||
with: | ||
|
@@ -53,9 +106,15 @@ jobs: | |
trusted-public-keys = ${{ env.TRUSTED_PUBLIC_KEYS }} | ||
substituters = ${{ env.SUBSTITUTERS }} | ||
experimental-features = nix-command flakes | ||
- name: 💾➤ Import Nix store cache | ||
if: "steps.nix-cache.outputs.cache-hit == 'true'" | ||
run: "nix-store --import < /tmp/nixcache" | ||
- name: 🔬 Test with `leios-sim-test` | ||
run: | | ||
nix run --accept-flake-config .#leios-sim-test | ||
- name: ➤💾 Export Nix store cache | ||
if: "steps.nix-cache.outputs.cache-hit != 'true'" | ||
run: "nix-store --export $(find /nix/store -maxdepth 1 -name '*-*') > /tmp/nixcache" | ||
|
||
build-docusaurus: | ||
runs-on: ubuntu-22.04 | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{-# OPTIONS --allow-unsolved-metas #-} | ||
|
||
module Leios.SimpleSpec where | ||
|
||
open import Ledger.Prelude | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,6 @@ depend: | |
standard-library | ||
standard-library-classes | ||
standard-library-meta | ||
formal-ledger | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @WhatisRT, please delete if this interferes with your work in progress. |
||
include: | ||
. | ||
../../formal-ledger-specifications/src/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @WhatisRT, please restore if this interferes with your work in progress. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WhatisRT, please delete if this interferes with your work in progress.