Skip to content

Commit

Permalink
Fix issues with CI
Browse files Browse the repository at this point in the history
 * Fix a few paths and such in github actions script
 * Move file substitution lines in tests from Makefile to dedicated bash
   script - for some reason they were not working in my container.
   Possibly Make v4.3 does not support command substitutions while v4.4
   (on my local computer) does?
  • Loading branch information
arendsee committed Jan 16, 2024
1 parent 6d40dce commit a36b231
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 35 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ jobs:
- name: Set up C++ environment
run: |
# clone the morloc C++ headers for shared type definitions
git clone https://github.com/morloclib/mlccpptypes $HOME/.morloc/mlccpptypes
mkdir -p $HOME/.morloc/include
git clone https://github.com/morloclib/mlccpptypes $HOME/.morloc/include/mlccpptypes
- uses: r-lib/actions/setup-r@v2

Expand Down
4 changes: 2 additions & 2 deletions test-suite/golden-tests/file-input-c/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
a.txt
b.txt
a.json
b.json
14 changes: 2 additions & 12 deletions test-suite/golden-tests/file-input-c/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
all:
rm -f obs.txt
morloc make -v foo.loc > log
echo '"a"' > a.json
echo '"b"' > b.json
>obs.txt
./nexus.py foo a.json b.json >> obs.txt
./nexus.py foo '"a"' b.json >> obs.txt
./nexus.py foo '"a"' '"b"' >> obs.txt
./nexus.py foo '"a"' <(echo '"b"') >> obs.txt
echo '"b"' | ./nexus.py foo '"a"' /dev/stdin >> obs.txt

build:
g++ --std=c++17 -o pool-cpp.out pool.cpp -I/home/z/.morloc/include -I.
bash run.sh > obs.txt

clean:
rm -rf nexus* pool* __pycache__ a.json b.json
rm -rf nexus* pool* a.json b.json
8 changes: 8 additions & 0 deletions test-suite/golden-tests/file-input-c/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
echo '"a"' > a.json
echo '"b"' > b.json
./nexus.py foo a.json b.json
./nexus.py foo '"a"' b.json
./nexus.py foo '"a"' '"b"'
./nexus.py foo '"a"' <(echo '"b"')
echo '"b"' | ./nexus.py foo '"a"' /dev/stdin
4 changes: 2 additions & 2 deletions test-suite/golden-tests/file-input-py/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
a.txt
b.txt
a.json
b.json
9 changes: 1 addition & 8 deletions test-suite/golden-tests/file-input-py/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
all:
rm -f obs.txt
morloc make -v foo.loc > log
echo '"a"' > a.json
echo '"b"' > b.json
>obs.txt
./nexus.py foo a.json b.json >> obs.txt
./nexus.py foo '"a"' b.json >> obs.txt
./nexus.py foo '"a"' '"b"' >> obs.txt
./nexus.py foo '"a"' <(echo '"b"') >> obs.txt
echo '"b"' | ./nexus.py foo '"a"' /dev/stdin >> obs.txt
bash run.sh > obs.txt

clean:
rm -rf nexus* pool* __pycache__ a.json b.json
8 changes: 8 additions & 0 deletions test-suite/golden-tests/file-input-py/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
echo '"a"' > a.json
echo '"b"' > b.json
./nexus.py foo a.json b.json
./nexus.py foo '"a"' b.json
./nexus.py foo '"a"' '"b"'
./nexus.py foo '"a"' <(echo '"b"')
echo '"b"' | ./nexus.py foo '"a"' /dev/stdin
4 changes: 2 additions & 2 deletions test-suite/golden-tests/file-input-r/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
a.txt
b.txt
a.json
b.json
9 changes: 1 addition & 8 deletions test-suite/golden-tests/file-input-r/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
all:
rm -f obs.txt
morloc make -v foo.loc > log
echo '"a"' > a.json
echo '"b"' > b.json
>obs.txt
./nexus.py foo a.json b.json >> obs.txt
./nexus.py foo '"a"' b.json >> obs.txt
./nexus.py foo '"a"' '"b"' >> obs.txt
./nexus.py foo '"a"' <(echo '"b"') >> obs.txt
echo '"b"' | ./nexus.py foo '"a"' /dev/stdin >> obs.txt
bash run.sh > obs.txt

clean:
rm -rf nexus* pool* a.json b.json
8 changes: 8 additions & 0 deletions test-suite/golden-tests/file-input-r/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
echo '"a"' > a.json
echo '"b"' > b.json
./nexus.py foo a.json b.json
./nexus.py foo '"a"' b.json
./nexus.py foo '"a"' '"b"'
./nexus.py foo '"a"' <(echo '"b"')
echo '"b"' | ./nexus.py foo '"a"' /dev/stdin

0 comments on commit a36b231

Please sign in to comment.