-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from objectionary/23-add-nix-script-to-run-pip…
…eline Add nix script to run pipeline
- Loading branch information
Showing
5 changed files
with
172 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,10 +27,24 @@ jobs: | |
uses: actions/checkout@v4 | ||
|
||
- name: 🧰 Setup Stack | ||
uses: freckle/stack-action@v4 | ||
# FIXME use freckle/stack-action@v4 when https://github.com/freckle/stack-action/pull/31 is merged | ||
uses: deemp/stack-action@main | ||
with: | ||
fast: ${{ github.ref_name != 'master' }} | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: "zulu" | ||
java-version: 21 | ||
|
||
- run: npm install -g [email protected] | ||
|
||
- run: ./pipeline.sh | ||
|
||
haddock: | ||
needs: [build] | ||
if: ${{ github.ref_name == 'master' }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
mkdir -p pipeline | ||
cd pipeline | ||
|
||
shopt -s expand_aliases | ||
|
||
EO=0.34.2 | ||
alias eo="eoc --parser=${EO}" | ||
|
||
cat > app.eo <<EOT | ||
[args] > app | ||
QQ.io.stdout > @ | ||
"Hello, world!\n" | ||
EOT | ||
|
||
eo clean | ||
eo link | ||
eo --alone dataize app > before.txt | ||
|
||
eo phi | ||
|
||
# Now, you modify/normalize this file: | ||
IO=".eoc/phi/app.phi" | ||
I=".eoc/phi/app.bk.phi" | ||
mv "$IO" "$I" | ||
stack run normalize-phi < "$I" > "$IO" \ | ||
|| { | ||
printf "\n\nNormalizer failed" | ||
printf "\n\n* EO expression:\n\n" | ||
cat app.eo | ||
printf "\n\n* Phi expression:\n\n" | ||
cat "$I" | ||
printf "\n\n* Error:\n\n" | ||
cat "$IO" | ||
exit 1 | ||
} | ||
|
||
printf "\n\nNormalizer succeeded!\n\n" | ||
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" | ||
|
||
eo unphi | ||
|
||
cp .eoc/unphi/app.xmir .eoc/2-optimize/app.xmir | ||
|
||
eo print | ||
|
||
cp .eoc/print/app.eo app.eo | ||
|
||
eo clean | ||
eo link | ||
eo --alone dataize app > after.txt | ||
|
||
if [ "$(cat before.txt)" == "$(cat after.txt)" ]; then | ||
echo 'SUCCESS' | ||
else | ||
echo 'FAILURE' | ||
exit 1 | ||
fi |
f94c194
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.
I wasn't able to retrieve PDD puzzles from the code base and submit them to github. If you think that it's a bug on our side, please submit it to yegor256/0pdd:
Please, copy and paste this stack trace to GitHub:
f94c194
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.
I wasn't able to retrieve PDD puzzles from the code base and submit them to github. If you think that it's a bug on our side, please submit it to yegor256/0pdd:
Please, copy and paste this stack trace to GitHub: