forked from dipdup-io/stone-packaging
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (62 loc) · 2.11 KB
/
release.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: release
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-14,]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up environment
run: |
echo "Setting up environment for ${{ matrix.os }}"
if [ "${{ matrix.os }}" == "ubuntu-22.04" ]; then
echo "TARGET_ARCH=x86_64" >> $GITHUB_ENV
elif [ "${{ matrix.os }}" == "macos-14" ]; then
echo "TARGET_ARCH=arm64" >> $GITHUB_ENV
fi
- name: Build
run: |
chmod +x ./build.sh
./build.sh
- name: Test
run: |
chmod +x ./test.sh
./test.sh
- name: Set output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Extract files and build DEB package
if: matrix.os == 'ubuntu-22.04'
run: |
chmod +x ./package_deb.sh
./package_deb.sh ${{ steps.vars.outputs.tag }}
- name: Rename binaries ubuntu
if: matrix.os == 'ubuntu-22.04'
run: |
echo "Renaming binaries to include architecture"
mv /tmp/stone-prover/build/bazelbin/src/starkware/main/cpu/cpu_air_prover ./cpu_air_prover-${TARGET_ARCH}
mv /tmp/stone-prover/build/bazelbin/src/starkware/main/cpu/cpu_air_verifier ./cpu_air_verifier-${TARGET_ARCH}
mv /tmp/stone-prover/stone-prover.deb /tmp/stone-prover/stone-prover-linux-${TARGET_ARCH}.deb
- name: Rename binaries macos
if: matrix.os == 'macos-14'
run: |
echo "Renaming binaries to include architecture"
mv /tmp/stone-prover/build/bazelbin/src/starkware/main/cpu/cpu_air_prover ./cpu_air_prover-${TARGET_ARCH}
mv /tmp/stone-prover/build/bazelbin/src/starkware/main/cpu/cpu_air_verifier ./cpu_air_verifier-${TARGET_ARCH}
- name: Verify file existence#2
run: |
ls -la ./
ls -la /tmp/stone-prover/
- name: Upload files to a GitHub release
uses: softprops/action-gh-release@v2
with:
files: |
./cpu_air*
/tmp/stone-prover/*.deb