diff --git a/.github/workflows/ghc.yml b/.github/workflows/ghc.yml index bf3c72684..ebfbbb1aa 100644 --- a/.github/workflows/ghc.yml +++ b/.github/workflows/ghc.yml @@ -50,9 +50,11 @@ jobs: distribution: "zulu" java-version: 21 - - run: npm install -g eolang@0.15.1 - - - run: ./pipeline.sh + - name: Install EO + run: npm install -g eolang@0.15.1 + + - name: Run pipeline EO -> Phi -> Normalizer -> Phi -> EO + run: ./pipeline.sh haddock: needs: [build] diff --git a/flake.nix b/flake.nix index c63ea5751..5220dda72 100644 --- a/flake.nix +++ b/flake.nix @@ -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"; diff --git a/pipeline.sh b/pipeline.sh index 04ba4239d..c10e7546d 100755 --- a/pipeline.sh +++ b/pipeline.sh @@ -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 < "$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" @@ -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 eo unphi