Skip to content

Commit e86863d

Browse files
committed
chore: improve ci action
1 parent 904b94e commit e86863d

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,20 @@ jobs:
2020
corepack prepare yarn@4.9.2 --activate
2121
- name: Install dependencies
2222
run: yarn install --immutable
23+
- name: Install compact compiler
24+
env:
25+
COMPACT_VERSION: "v0.4.0"
26+
COMPACT_SHA256_URL: "https://github.com/midnightntwrk/compact/releases/download/compact-v0.4.0/compact-x86_64-unknown-linux-musl.tar.xz.sha256"
27+
run: |
28+
set -euo pipefail
29+
asset="compact-x86_64-unknown-linux-musl.tar.xz"
30+
url="https://github.com/midnightntwrk/compact/releases/download/compact-${COMPACT_VERSION}/${asset}"
31+
curl -LsSf "$url" -o "/tmp/${asset}"
32+
curl -LsSf "${COMPACT_SHA256_URL}" -o "/tmp/${asset}.sha256"
33+
# Normalize "sha256 filename" format to "sha256 /tmp/asset"
34+
awk '{print $1" /tmp/'"${asset}"'"}' "/tmp/${asset}.sha256" | shasum -a 256 -c -
35+
mkdir -p /tmp/compact
36+
tar -xJf "/tmp/${asset}" -C /tmp/compact
37+
echo "/tmp/compact" >> "$GITHUB_PATH"
2338
- name: Build all packages
2439
run: yarn build:all

0 commit comments

Comments
 (0)