ci: make bundled toolchain packaging portable
2e730e2 parent: 2ee9b31 modified
.github/workflows/release.yml +4 -3 | @@ -74,10 +74,11 @@ jobs: | ||
| 74 | 74 | run: | |
| 75 | 75 | appdir=dist/clonim.AppDir |
| 76 | 76 | install -Dm755 bin/clonim "$appdir/usr/bin/clonim" |
| 77 | - nim_bin=$(readlink -f "$(command -v nim)") | |
| 78 | - nim_root=$(dirname "$(dirname "$nim_bin")") | |
| 77 | + nim_lib=$(nim dump --hints:off | tail -n 1) | |
| 78 | + nim_root=$(dirname "$nim_lib") | |
| 79 | + nim_bin="$nim_root/bin/nim" | |
| 79 | 80 | install -Dm755 "$nim_bin" "$appdir/usr/bin/nim" |
| 80 | - cp -a "$nim_root/lib/." "$appdir/usr/lib/" | |
| 81 | + cp -a "$nim_lib/." "$appdir/usr/lib/" | |
| 81 | 82 | cp -a "$nim_root/config" "$appdir/usr/config" |
| 82 | 83 | install -Dm755 packaging/appimage/gcc "$appdir/usr/bin/gcc" |
| 83 | 84 | ln -s gcc "$appdir/usr/bin/cc" |
| @@ -74,10 +74,11 @@ jobs: | |||
| 74 | run: | | 74 | run: | |
| 75 | appdir=dist/clonim.AppDir | 75 | appdir=dist/clonim.AppDir |
| 76 | install -Dm755 bin/clonim "$appdir/usr/bin/clonim" | 76 | install -Dm755 bin/clonim "$appdir/usr/bin/clonim" |
| 77 | - nim_bin=$(readlink -f "$(command -v nim)") | 77 | + nim_lib=$(nim dump --hints:off | tail -n 1) |
| 78 | - nim_root=$(dirname "$(dirname "$nim_bin")") | 78 | + nim_root=$(dirname "$nim_lib") |
| 79 | + nim_bin="$nim_root/bin/nim" | ||
| 79 | install -Dm755 "$nim_bin" "$appdir/usr/bin/nim" | 80 | install -Dm755 "$nim_bin" "$appdir/usr/bin/nim" |
| 80 | - cp -a "$nim_root/lib/." "$appdir/usr/lib/" | 81 | + cp -a "$nim_lib/." "$appdir/usr/lib/" |
| 81 | cp -a "$nim_root/config" "$appdir/usr/config" | 82 | cp -a "$nim_root/config" "$appdir/usr/config" |
| 82 | install -Dm755 packaging/appimage/gcc "$appdir/usr/bin/gcc" | 83 | install -Dm755 packaging/appimage/gcc "$appdir/usr/bin/gcc" |
| 83 | ln -s gcc "$appdir/usr/bin/cc" | 84 | ln -s gcc "$appdir/usr/bin/cc" |
modified
run-tests.sh +6 -1 | @@ -12,7 +12,12 @@ for f in examples/*.clj; do | ||
| 12 | 12 | if [ "$got" = "$(cat "$exp")" ]; then |
| 13 | 13 | echo "ok $name" |
| 14 | 14 | else |
| 15 | - echo "FAIL $name"; diff <(echo "$got") "$exp" | head -20; fail=1 | |
| 15 | + got_file=$(mktemp) | |
| 16 | + printf '%s\n' "$got" > "$got_file" | |
| 17 | + echo "FAIL $name" | |
| 18 | + diff -u "$exp" "$got_file" | head -20 | |
| 19 | + rm -f "$got_file" | |
| 20 | + fail=1 | |
| 16 | 21 | fi |
| 17 | 22 | done |
| 18 | 23 | exit $fail |
| @@ -12,7 +12,12 @@ for f in examples/*.clj; do | |||
| 12 | if [ "$got" = "$(cat "$exp")" ]; then | 12 | if [ "$got" = "$(cat "$exp")" ]; then |
| 13 | echo "ok $name" | 13 | echo "ok $name" |
| 14 | else | 14 | else |
| 15 | - echo "FAIL $name"; diff <(echo "$got") "$exp" | head -20; fail=1 | 15 | + got_file=$(mktemp) |
| 16 | + printf '%s\n' "$got" > "$got_file" | ||
| 17 | + echo "FAIL $name" | ||
| 18 | + diff -u "$exp" "$got_file" | head -20 | ||
| 19 | + rm -f "$got_file" | ||
| 20 | + fail=1 | ||
| 16 | fi | 21 | fi |
| 17 | done | 22 | done |
| 18 | exit $fail | 23 | exit $fail |