Skip to content

Commit 8c862de

Browse files
committed
Merge remote-tracking branch 'origin/master' into krypto-bytes
2 parents 639e67f + 2a99e06 commit 8c862de

File tree

10 files changed

+216
-845
lines changed

10 files changed

+216
-845
lines changed

.github/workflows/release.yml

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,41 +34,63 @@ jobs:
3434
authToken: '${{ secrets.CACHIX_PUBLIC_TOKEN }}'
3535

3636
- name: Build
37-
run: nix-build -A project.x86_64-linux.kore -A project.x86_64-linux.kore.checks
37+
run: nix build .#kore-exec
3838

3939
cache-cabal:
4040
name: 'Cache Cabal'
41-
runs-on: ubuntu-22.04
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
include:
45+
- runner: ubuntu-22.04
46+
os: ubuntu-22.04
47+
nix: x86_64-linux
48+
- runner: macos-12
49+
os: macos-12
50+
nix: x86_64-darwin
51+
- runner: MacM1
52+
os: self-macos-12
53+
nix: aarch64-darwin
54+
runs-on: ${{ matrix.runner }}
4255
steps:
43-
- name: Install prerequisites
44-
run: |
45-
sudo apt install --yes z3 libsecp256k1-dev
46-
4756
- name: Check out code
4857
uses: actions/checkout@v3
4958
with:
5059
submodules: recursive
5160

61+
# Do the Following only on Public Runners; Mac Runner is pre-installed with build tools
62+
- name: 'Install Nix'
63+
if: ${{ !startsWith(matrix.os, 'self') }}
64+
uses: cachix/install-nix-action@v22
65+
with:
66+
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
67+
extra_nix_config: |
68+
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
69+
substituters = http://cache.nixos.org https://cache.iog.io
70+
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
71+
72+
- name: 'Install Cachix'
73+
if: ${{ !startsWith(matrix.os, 'self') }}
74+
uses: cachix/cachix-action@v12
75+
with:
76+
name: k-framework
77+
authToken: '${{ secrets.CACHIX_PUBLIC_TOKEN }}'
78+
5279
- name: Cache Cabal package database and store
5380
uses: actions/cache@v3
5481
with:
5582
path: |
5683
~/.cabal/packages
5784
~/.cabal/store
58-
key: cabal-2-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('kore/kore.cabal') }}-${{ hashFiles('kore-rpc-types/kore-rpc-types.cabal') }}
85+
key: cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('kore/kore.cabal') }}-${{ hashFiles('kore-rpc-types/kore-rpc-types.cabal') }}
5986
restore-keys: |
60-
cabal-2-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('kore/kore.cabal') }}
61-
cabal-2-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}
62-
cabal-2-${{ runner.os }}-ghc-${{ env.ghc_version }}
87+
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('kore/kore.cabal') }}
88+
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}
89+
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}
6390
64-
- uses: haskell/actions/setup@v2
65-
id: setup-haskell-cabal
66-
with:
67-
ghc-version: ${{ env.ghc_version }}
68-
cabal-version: "3.6"
91+
- name: Test
92+
run: GC_DONT_GC=1 nix develop .#cabal --command bash -c "cabal update && cabal test --enable-tests --test-show-details=direct all"
6993

70-
- name: Build
71-
run: cabal v2-build --enable-tests --enable-benchmarks all
7294

7395
cache-stack:
7496
name: 'Cache Stack'

.github/workflows/test.yml

Lines changed: 17 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
- name: Format
4141
run: |
42-
nix run .#format
42+
nix develop .#fourmolu --command bash -c "./scripts/fourmolu.sh"
4343
4444
- name: Update branch
4545
env:
@@ -109,10 +109,23 @@ jobs:
109109
authToken: '${{ secrets.CACHIX_PUBLIC_TOKEN }}'
110110

111111
- name: Build
112-
run: GC_DONT_GC=1 nix-build -A project.${{ matrix.nix }}.kore.components.exes
112+
run: GC_DONT_GC=1 nix build .#kore-exec
113113

114-
- name: Run unit tests
115-
run: GC_DONT_GC=1 nix-build -A project.${{ matrix.nix }}.kore.checks
114+
- name: Cache Cabal package database and store
115+
uses: actions/cache@v3
116+
with:
117+
path: |
118+
~/.cabal/packages
119+
~/.cabal/store
120+
key: cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}-${{ hashFiles('kore/kore.cabal') }}-${{ hashFiles('kore-rpc-types/kore-rpc-types.cabal') }}
121+
restore-keys: |
122+
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}-${{ hashFiles('kore/kore.cabal') }}
123+
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}
124+
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}
125+
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}
126+
127+
- name: Test
128+
run: GC_DONT_GC=1 nix develop .#cabal --command bash -c "cabal update && cabal build all && cabal test --enable-tests --test-show-details=direct all"
116129

117130
nix-integration:
118131
name: 'Nix / Integration'
@@ -146,46 +159,6 @@ jobs:
146159
--override-input haskell-backend . --update-input haskell-backend \
147160
--command bash -c "cd test && make -j2 --output-sync test"
148161
149-
cabal:
150-
name: 'Cabal / Unit Tests'
151-
needs: formatting
152-
runs-on: ubuntu-22.04
153-
steps:
154-
- name: Install prerequisites
155-
run: |
156-
sudo apt install --yes z3 libsecp256k1-dev
157-
158-
- uses: actions/checkout@v3
159-
with:
160-
# Check out pull request HEAD instead of merge commit.
161-
ref: ${{ github.event.pull_request.head.sha }}
162-
submodules: recursive
163-
164-
- name: Cache Cabal package database and store
165-
uses: actions/cache@v3
166-
with:
167-
path: |
168-
~/.cabal/packages
169-
~/.cabal/store
170-
key: cabal-2-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}-${{ hashFiles('kore/kore.cabal') }}-${{ hashFiles('kore-rpc-types/kore-rpc-types.cabal') }}
171-
restore-keys: |
172-
cabal-2-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}-${{ hashFiles('kore/kore.cabal') }}
173-
cabal-2-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}
174-
cabal-2-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}
175-
cabal-2-${{ runner.os }}-ghc-${{ env.ghc_version }}
176-
177-
- uses: haskell/actions/setup@v2
178-
id: setup-haskell-cabal
179-
with:
180-
ghc-version: ${{ env.ghc_version }}
181-
cabal-version: "3.6"
182-
183-
- name: Run unit tests
184-
run: cabal v2-test --enable-tests --test-show-details=direct all
185-
186-
- name: Configure with profiling
187-
run: cabal v2-configure --enable-profiling -f-threaded
188-
189162
stack:
190163
name: 'Stack / Unit Tests'
191164
needs: formatting
@@ -229,41 +202,6 @@ jobs:
229202
- name: Run unit tests
230203
run: stack test --pedantic
231204

232-
stack-haddock:
233-
name: 'Stack / Haddock check'
234-
needs: formatting
235-
runs-on: ubuntu-22.04
236-
steps:
237-
- name: Install prerequisites
238-
run: |
239-
sudo apt install --yes z3 libsecp256k1-dev
240-
241-
- uses: actions/checkout@v3
242-
with:
243-
# Check out pull request HEAD instead of merge commit.
244-
ref: ${{ github.event.pull_request.head.sha }}
245-
submodules: recursive
246-
247-
- name: Cache Stack root
248-
uses: actions/cache@v3
249-
with:
250-
path: ~/.stack
251-
key: stack-haddock-2-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('stack.yaml.lock') }}
252-
restore-keys: |
253-
stack-haddock-2-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('stack.yaml') }}
254-
stack-haddock-2-${{ runner.os }}-ghc-${{ env.ghc_version }}
255-
256-
- uses: haskell/actions/setup@v2
257-
id: setup-haskell-stack
258-
with:
259-
ghc-version: ${{ env.ghc_version }}
260-
stack-version: ${{ env.stack_version }}
261-
enable-stack: true
262-
stack-setup-ghc: true
263-
264-
- name: Build documentation
265-
run: |
266-
stack haddock --fast
267205
hlint:
268206
name: 'HLint'
269207
needs: formatting

deps/k_release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.0.144
1+
6.0.151

docs/kore-syntax.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,6 @@ A sort is either a _sort variable_ or a _sort constructor_ applied to a list of
181181
<application-pattern> ::=
182182
<symbol-identifier> "{" <sorts> "}" "(" <patterns> ")"
183183
184-
<multi-or> ::=
185-
"\or" "{" <sort> "}" "(" <patterns> ")"
186-
187184
<matching-logic-pattern>
188185
::=
189186
// Connectives
@@ -213,9 +210,7 @@ A sort is either a _sort variable_ or a _sort constructor_ applied to a list of
213210
| "\dv" "{" <sort> "}" "(" <string-literal> ")"
214211
// Syntactic sugar
215212
| "\left-assoc" "{" "}" "(" <application-pattern> ")"
216-
| "\left-assoc" "{" "}" "(" <multi-or> ")"
217213
| "\right-assoc" "{" "}" "(" <application-pattern> ")"
218-
| "\right-assoc" "{" "}" "(" <multi-or> ")"
219214
```
220215

221216
The left-assoc (resp. right-assoc) construct allows a chain of applications of

0 commit comments

Comments
 (0)