Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
pshirshov committed Oct 25, 2024
1 parent de6473a commit 69a4a4f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 21 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/baboon-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,9 @@ jobs:
- ${{ matrix.os }}
- ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- name: Install Nix
if: matrix.preconfigured != true
uses: DeterminateSystems/nix-installer-action@main
- name: Cache Nix
if: matrix.preconfigured != true
uses: DeterminateSystems/magic-nix-cache-action@main
- uses: 7mind/github-env@minimal
with:
setup-nix: matrix.preconfigured != true
- name: Build
run: ./build.sh nix build test
- uses: actions/upload-artifact@v4
Expand All @@ -68,7 +64,9 @@ jobs:
- ${{ matrix.os }}
- ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- uses: 7mind/github-env@minimal
with:
setup-nix: false
- name: Set up GraalVM (Java ${{ matrix.java-version }})
uses: graalvm/setup-graalvm@v1
with:
Expand Down
17 changes: 6 additions & 11 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,26 @@

set -e

self="$(realpath "$0")"
path="$(dirname "$self")"

(for e in "$@"; do [[ "$e" == "nix" ]] && exit 0; done) && NIXIFY=1 || NIXIFY=0

if [[ "$NIXIFY" == 1 && -z "${IN_NIX_SHELL+x}" ]]; then
echo "Restarting in Nix..."
self=$(realpath "$0")
set -x
nix flake lock
nix flake metadata
exec nix develop --command bash $self "$@"
exec nix develop --command bash "$self" "$@"
fi

set -x
cd "$(dirname $(readlink -f "$0"))"
cd "$path"

for i in "$@"
do
case $i in
nix) ;;

build) ./devops/local-build.sh ;;
test) ./devops/local-test.sh ;;

*)
echo "Unknown option: $i"
exit 1
;;
*) "./devops/$i.sh" ;;
esac
done
File renamed without changes.
4 changes: 2 additions & 2 deletions devops/prepare-dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
set -e
set -x

src=$1
tgt=$2
src="$(realpath "$1")"
tgt="$(realpath "$2")"

distbin="$tgt/dist-bin"
distzip="$tgt/dist-zip"
Expand Down
File renamed without changes.

0 comments on commit 69a4a4f

Please sign in to comment.