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

27 fix pipeline #28

Merged
merged 9 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
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
6 changes: 4 additions & 2 deletions .github/workflows/ghc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ jobs:
distribution: "zulu"
java-version: 21

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

- run: ./pipeline.sh
- name: Run pipeline EO -> Phi -> Normalizer -> Phi -> EO
run: ./pipeline.sh

haddock:
needs: [build]
Expand Down
11 changes: 8 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,15 @@
"${packageName}" = haskellPackages."${packageName}";

pipeline = {
runtimeInputs = [ stack pkgs.jdk21 packages.eoc pkgs.maven ];
runtimeInputs = [
stack
pkgs.jdk21
packages.eoc
pkgs.maven
pkgs.perl
];
text = ''
JAVA_HOME="${pkgs.jdk21.home}"
export JAVA_HOME
export JAVA_HOME="${pkgs.jdk21.home}"
${builtins.readFile ./pipeline.sh}
'';
description = "Run pipeline";
Expand Down
13 changes: 9 additions & 4 deletions pipeline.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
set -euo pipefail

mkdir -p pipeline
cd pipeline

shopt -s expand_aliases

EO=0.34.2
EO="0.34.3"
alias eo="eoc --parser=${EO}"

cat > app.eo <<EOT
Expand All @@ -24,7 +26,7 @@ I=".eoc/phi/app.bk.phi"
mv "$IO" "$I"
stack run normalize-phi < "$I" > "$IO" \
|| {
printf "\n\nNormalizer failed"
printf "\n\nNormalizer failed!"
printf "\n\n* EO expression:\n\n"
cat app.eo
printf "\n\n* Phi expression:\n\n"
Expand All @@ -33,14 +35,17 @@ stack run normalize-phi < "$I" > "$IO" \
cat "$IO"
exit 1
}
perl -i -pe 'chomp if eof' "$IO"

printf "\n\nNormalizer succeeded!\n\n"
printf "\n\nNormalizer succeeded!"
printf "\n\n* EO expression:\n\n"
cat app.eo
printf "\n\n* Phi expression:\n\n"
cat "$I"
printf "\n\n* Normalized Phi expression:\n\n"
cat "$IO"
printf "\n\n* Diff:\n\n"
diff "$I" "$IO"
diff "$I" "$IO" || true
deemp marked this conversation as resolved.
Show resolved Hide resolved

eo unphi

Expand Down