-
-
Notifications
You must be signed in to change notification settings - Fork 97
/
.cirrus.yml
56 lines (48 loc) · 1.81 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-base:latest
build-task:
env:
DTHK_PLATFORM: macos
DTHK_ARCH: aarch64
INSTALL_DIR: ${HOME}
GRAALVM_VERSION: 22.0.2
GRAALVM_SLUG: 9.1
GRAALVM_HOME: ${HOME}/graalvm-community-openjdk-${GRAALVM_VERSION}+${GRAALVM_SLUG}/Contents/Home/
GITHUB_TOKEN: ENCRYPTED[0ea782cbbd99c2486b0f55b8eefcf91606a0805faaa3f35e55ecb75268b0046b874c856753f528ba689a9cdaa11e47c2]
script: |
set -euo pipefail
# install babashka
curl -sLO https://raw.githubusercontent.com/babashka/babashka/master/install
chmod +x install
./install --dir ${HOME}/.local/bin
export PATH=${HOME}/.local/bin:$PATH
# install clojure
curl -L -O https://github.com/clojure/brew-install/releases/latest/download/posix-install.sh
chmod +x posix-install.sh
sudo ./posix-install.sh
# install graalvm
pushd "$INSTALL_DIR" >/dev/null
curl -L -O https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${GRAALVM_VERSION}/graalvm-community-jdk-${GRAALVM_VERSION}_${DTHK_PLATFORM}-${DTHK_ARCH}_bin.tar.gz
sudo xattr -r -d com.apple.quarantine graalvm-community-jdk-${GRAALVM_VERSION}_${DTHK_PLATFORM}-${DTHK_ARCH}_bin.tar.gz
tar -xzf graalvm-community-jdk-${GRAALVM_VERSION}_${DTHK_PLATFORM}-${DTHK_ARCH}_bin.tar.gz
popd >/dev/null
# prepare
export PATH=${GRAALVM_HOME}/bin:${PATH}
export JAVA_HOME=${GRAALVM_HOME}
sudo /usr/sbin/softwareupdate --install-rosetta --agree-to-license
java -version
${GRAALVM_HOME}bin/native-image --version
echo $PATH
native-image --version
# compile
bb ni-cli
# test
file dthk
bb test native-image
bb test bb-pod
# upload artifact
if [[ $CIRRUS_RELEASE == "" ]]; then
bb release native-cli
fi
binaries_artifacts:
path: "dist/*"