diff --git a/.github/workflows/itest.yml b/.github/workflows/itest.yml new file mode 100644 index 00000000..b0512b35 --- /dev/null +++ b/.github/workflows/itest.yml @@ -0,0 +1,20 @@ +name: itest +on: + push: + branches: master + pull_request: + branches: master +jobs: + itest: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 16 + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 20 + - run: npm install -g eolang + - run: ./pipeline.sh \ No newline at end of file diff --git a/.gitignore b/.gitignore index fc587c5e..8a188c2b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +.eoc +before.txt +after.txt +app.eo *.bak eo-phi-normalizer/src/Language/EO/Phi/Syntax/Lex.hs eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.hs diff --git a/pipeline.sh b/pipeline.sh new file mode 100755 index 00000000..0b026e6e --- /dev/null +++ b/pipeline.sh @@ -0,0 +1,40 @@ +#!/bin/bash +set -x +set -e + +EO=0.34.2 + +cat > app.eo < app + QQ.io.stdout > @ + "Hello, world!\n" +EOT + +eoc "--parser=${EO}" clean +eoc "--parser=${EO}" link +eoc "--parser=${EO}" --alone dataize app > before.txt + +eoc "--parser=${EO}" phi + +# Now, you modify/normalize this file: +# .eoc/phi/app.phi + +eoc "--parser=${EO}" unphi + +cp .eoc/unphi/app.xmir .eoc/2-optimize/app.xmir + +eoc "--parser=${EO}" print + +cp .eoc/print/app.eo app.eo + +eoc "--parser=${EO}" clean + +eoc "--parser=${EO}" link +eoc "--parser=${EO}" --alone dataize app > after.txt + +if [ "$(cat before.txt)" == "$(cat after.txt)" ]; then + echo 'SUCCESS' +else + echo 'FAILURE' + exit 1 +fi \ No newline at end of file