Skip to content
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

Test against EO compiler #98

Merged
merged 77 commits into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
df82168
feat: add eo submodule
deemp Feb 6, 2024
ac800c5
fix: set eo to 0.34.1
deemp Feb 6, 2024
7ccb80f
fix: clone submodules too
deemp Feb 6, 2024
0dd5344
feat: add script to transform the original eo tests
deemp Feb 6, 2024
db7e156
refactor: remove old pipeline files
deemp Feb 6, 2024
8558eb3
fix: directory name in test config
deemp Feb 8, 2024
e958b48
refactor: pipeline script
deemp Feb 8, 2024
6319b78
refactor: action
deemp Feb 8, 2024
26127b6
fix: gitignore
deemp Feb 8, 2024
99c5173
fix: incomplete pattern matches warning
deemp Feb 8, 2024
5e01349
fix: enable submodules
deemp Feb 8, 2024
81e9204
feat: add eolang as a dev dependency
deemp Feb 8, 2024
819a488
feat: enable eo phi
deemp Feb 8, 2024
8d540f1
refactor: install eo from local node config
deemp Feb 8, 2024
b78ed11
feat: add `single` option that prints a single normalized program
deemp Feb 9, 2024
e1f63e3
refactor: pipeline script
deemp Feb 9, 2024
26d1d55
fix: directory
deemp Feb 9, 2024
53ce696
fix: print
deemp Feb 9, 2024
65b74e1
feat: test without normalization
deemp Feb 9, 2024
9e82c03
feat: clean pipeline directory before a run
deemp Feb 9, 2024
20711f4
fix: don't remove empty files
deemp Feb 9, 2024
b25a978
feat: add one more print
deemp Feb 9, 2024
ef7b8ba
refactor: formatting
deemp Feb 9, 2024
9c17919
fix: print a program, not an object
deemp Feb 9, 2024
5557e89
chore: merge master
deemp Feb 9, 2024
64bdd1f
fix: set shell for pipeline
deemp Feb 9, 2024
8ec6513
fix: remove silently
deemp Feb 9, 2024
601a878
fix: output with the `single` flag enabled
deemp Feb 9, 2024
309d24b
chore: update eo
deemp Feb 13, 2024
a9c991a
chore: update eo parser version
deemp Feb 13, 2024
4c83611
fix: pipeline script location
deemp Feb 14, 2024
31091ac
fix: phi grammar
deemp Feb 15, 2024
b9a3ab0
Merge remote-tracking branch 'origin' into 93-reuse-tests-from-the-eo…
deemp Feb 16, 2024
54cef85
chore: update eo to 0.35.3
deemp Feb 16, 2024
1a1c220
chore: update eolang
deemp Feb 16, 2024
0c9aa05
Merge branch '145-switch-to-lts-226-ghc-963' into 93-reuse-tests-from…
deemp Feb 21, 2024
668f06b
refactor: merge "pipeline" and "build" jobs
deemp Feb 21, 2024
76de21a
Merge branch 'master' into 93-reuse-tests-from-the-eo-repository-usin…
deemp Feb 29, 2024
4266c6d
fix: demand recurse-submodules
deemp Feb 29, 2024
465a131
refactor: format, add type
deemp Mar 1, 2024
3ddfa83
chore: update eo to 0.35.5
deemp Mar 1, 2024
67e2b2e
fix: pipeline script
deemp Mar 1, 2024
6f8f23b
refactor: partition pipeline into functions
deemp Mar 1, 2024
bd85cf1
fix: disable normalizer
deemp Mar 1, 2024
23782d6
fix: add metas
deemp Mar 3, 2024
b008999
feat: add try-unphi script
deemp Mar 3, 2024
696a36a
Merge branch 'master' into 93-reuse-tests-from-the-eo-repository-usin…
deemp Mar 4, 2024
b94786a
fix: enable stack in pipeline
deemp Mar 4, 2024
2bba060
Merge remote-tracking branch 'origin' into 93-reuse-tests-from-the-eo…
deemp Mar 5, 2024
c933eb0
fix: comment out rule 5
deemp Mar 5, 2024
502966a
fix: checkout submodules
deemp Mar 5, 2024
ea83b7b
fix: use LC_ALL everywhere
deemp Mar 5, 2024
32501dc
try: set LC_ALL
deemp Mar 5, 2024
0637f1c
try: debug stack-action
deemp Mar 5, 2024
e0dde46
fix: update eo and unphi
deemp Mar 6, 2024
8c1135d
fix: disable tests on Windows
deemp Mar 6, 2024
1f156de
fix: upgrade eo
deemp Mar 6, 2024
564a5d0
fix: disable tmate
deemp Mar 6, 2024
c2a5af1
feat: don't fail-fast in pipeline
deemp Mar 6, 2024
a179200
fix: eo version
deemp Mar 6, 2024
3d83dd2
fix: use cross-platform commands
deemp Mar 6, 2024
6cf27b4
fix: remove add_metas, fix "find" command
deemp Mar 6, 2024
178945c
fix: "find" command arguments
deemp Mar 6, 2024
bf2b3f1
feat: list all eo tests
deemp Mar 7, 2024
776ea1e
fix: disable some tests
deemp Mar 7, 2024
0aef90a
feat: optional "programs" in config
deemp Mar 7, 2024
6c3fdff
fix: disable some tests
deemp Mar 7, 2024
af31704
fix: log message
deemp Mar 7, 2024
560ab49
feat: support optional tests
deemp Mar 7, 2024
932822d
fix: disable tests that fail on windows
deemp Mar 7, 2024
717ad9c
fix: update EO to 0.35.8
deemp Mar 7, 2024
13aa9f1
fix: switch eo to 0.35.6
deemp Mar 7, 2024
d229554
Add support for comments in Phi syntax
aabounegm Mar 5, 2024
343a7c1
Add support for empty delta bindings
aabounegm Mar 6, 2024
24a9310
Add pattern matches for DeltaEmptyBinding
aabounegm Mar 6, 2024
9a31076
fix: update eo submodule to 0.35.8
deemp Mar 7, 2024
91699d1
Merge remote-tracking branch 'origin' into 93-reuse-tests-from-the-eo…
deemp Mar 7, 2024
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
47 changes: 10 additions & 37 deletions .github/workflows/ghc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,49 +41,26 @@ jobs:
with:
hlint-bin: ${{ steps.get-hlint-bin.outputs.hlint-bin }}

build:
name: "Build and test with GHC"
pipeline:
name: Run pipeline
needs: check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4

- uses: haskell-actions/run-fourmolu@v10
if: matrix.os == 'ubuntu-latest'
with:
version: "0.14.0.0"
pattern: |
eo-phi-normalizer/**/*.hs
!eo-phi-normalizer/src/Language/EO/Phi/Syntax/**/*.hs
!eo-phi-normalizer/Setup.hs

- name: 🧰 Setup Stack
uses: freckle/stack-action@v5
with:
stack-build-arguments: ${{ github.ref_name != 'master' && '--fast' || '' }} --pedantic

pipeline:
if: false
name: "Run pipeline"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
program: [1]

steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4
with:
submodules: true

- name: 🧰 Setup Stack
uses: freckle/stack-action@v5
with:
stack-build-arguments: ${{ github.ref_name != 'master' && '--fast' || '' }} --pedantic
test: ${{ matrix.os != 'windows-latest' }}

- uses: actions/setup-node@v4
with:
Expand All @@ -94,16 +71,12 @@ jobs:
distribution: "zulu"
java-version: 21

- name: Install EO
run: npm install -g [email protected]

- name: Run pipeline
run: ./pipeline.sh
env:
PROGRAM: ${{ matrix.program }}
shell: bash
run: ./scripts/pipeline.sh

docs:
needs: [build]
needs: pipeline
if: ${{ github.ref_name == 'master' }}
name: "Build and upload site (master)"
runs-on: ubuntu-latest
Expand All @@ -113,7 +86,7 @@ jobs:
uses: actions/checkout@v4

- name: 🧰 Setup Stack
uses: freckle/stack-action@v4
uses: freckle/stack-action@v5
with:
test: false

Expand All @@ -126,7 +99,7 @@ jobs:
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'
mdbook-version: "latest"

- name: Build site
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ __pycache__
*.fdb_latexmk
*.fls
*.log
pipeline/*
!pipeline/config.yaml
node_modules
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "eo"]
path = eo
url = https://github.com/objectionary/eo
2 changes: 1 addition & 1 deletion eo
Submodule eo updated 129 files
36 changes: 18 additions & 18 deletions eo-phi-normalizer/test/eo/phi/rules/yegor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,24 +94,24 @@ rules:
# when: []
# tests: []

- name: Rule 5
description: 'ξ-dispatch'
context:
current_object: '⟦ !a ↦ !obj, !B ⟧'
current_attribute: '!a'
pattern: |
ξ
result: |
⟦ !B ⟧
when:
- present_attrs:
attrs: ['ν', 'σ', 'ρ']
bindings: ['!B']
tests:
- name: Replaces ξ with the actual object
input: '⟦ a ↦ ⟦ ⟧, x ↦ ξ.a, ν ↦ ⟦ ⟧, σ ↦ ⟦ ⟧, ρ ↦ ⟦ ⟧ ⟧'
output:
- '⟦ a ↦ ⟦ ⟧, x ↦ ⟦ a ↦ ⟦ ⟧, ν ↦ ⟦ ⟧, σ ↦ ⟦ ⟧, ρ ↦ ⟦ ⟧ ⟧.a, ν ↦ ⟦ ⟧, σ ↦ ⟦ ⟧, ρ ↦ ⟦ ⟧ ⟧'
# - name: Rule 5
# description: 'ξ-dispatch'
# context:
# current_object: '⟦ !a ↦ !obj, !B ⟧'
# current_attribute: '!a'
# pattern: |
# ξ
# result: |
# ⟦ !B ⟧
# when:
# - present_attrs:
# attrs: ['ν', 'σ', 'ρ']
# bindings: ['!B']
# tests:
# - name: Replaces ξ with the actual object
# input: '⟦ a ↦ ⟦ ⟧, x ↦ ξ.a, ν ↦ ⟦ ⟧, σ ↦ ⟦ ⟧, ρ ↦ ⟦ ⟧ ⟧'
# output:
# - '⟦ a ↦ ⟦ ⟧, x ↦ ⟦ a ↦ ⟦ ⟧, ν ↦ ⟦ ⟧, σ ↦ ⟦ ⟧, ρ ↦ ⟦ ⟧ ⟧.a, ν ↦ ⟦ ⟧, σ ↦ ⟦ ⟧, ρ ↦ ⟦ ⟧ ⟧'

- name: Rule 6
description: 'Accessing an α-binding'
Expand Down
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
text =
let mkProgram = n: ''
export PROGRAM="${builtins.toString n}"
${builtins.readFile ./pipeline.sh}
${builtins.readFile ./scripts/pipeline.sh}
''; in

''
Expand All @@ -177,7 +177,7 @@
stack
];
text = ''
export LANG=C.utf8
export LC_ALL=C.UTF-8
mdsh
# create sample program
mdsh -i site/docs/src/common/sample-program.md --work_dir .
Expand Down
9 changes: 9 additions & 0 deletions hie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,14 @@ cradle:
- path: "eo-phi-normalizer/app/Paths_eo_phi_normalizer.hs"
component: "eo-phi-normalizer:exe:normalize-phi"

- path: "eo-phi-normalizer/app/Paths_eo_phi_normalizer.hs"
component: "eo-phi-normalizer:exe:normalize-phi"

- path: "eo-phi-normalizer/test"
component: "eo-phi-normalizer:test:eo-phi-normalizer-test"

- path: "scripts/transform-eo-tests/app/Main.hs"
component: "transform-eo-tests:exe:transform-eo-tests"

- path: "scripts/transform-eo-tests/app/Paths_transform_eo_tests.hs"
component: "transform-eo-tests:exe:transform-eo-tests"
Loading
Loading