Skip to content

Commit dacf545

Browse files
committed
added both macs
1 parent 138f14f commit dacf545

File tree

1 file changed

+37
-48
lines changed

1 file changed

+37
-48
lines changed

.github/workflows/release-binaries.yml

Lines changed: 37 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -74,48 +74,44 @@ jobs:
7474
# dist/*.tar.gz
7575
# dist/*.sha256
7676

77-
# macos-x86_64:
78-
# runs-on: macos-13 # Intel runner
79-
# steps:
80-
# - uses: actions/checkout@v4
81-
# - uses: dtolnay/rust-toolchain@stable
82-
# with:
83-
# targets: x86_64-apple-darwin
77+
macos-x86_64:
78+
runs-on: macos-13 # Intel runner
79+
steps:
80+
- uses: actions/checkout@v4
81+
- uses: dtolnay/rust-toolchain@stable
82+
with:
83+
targets: x86_64-apple-darwin
8484

85-
# - name: Install SP1 toolchain
86-
# run: |
87-
# curl -L https://sp1up.succinct.xyz | bash
88-
# ~/.sp1/bin/sp1up
89-
# ~/.sp1/bin/cargo-prove prove --version
90-
# source ~/.bashrc
85+
- name: Build (release)
86+
working-directory: ${{ env.CRATE_PATH }}
87+
env:
88+
CC_x86_64_apple_darwin: clang
89+
CXX_x86_64_apple_darwin: clang++
90+
CXXFLAGS_x86_64_apple_darwin: -std=c++17
91+
CARGO_TARGET_DIR: ${{ github.workspace }}/target/${{ runner.os }}-x86_64-apple-darwin-${{ github.run_id }}
92+
CARGO_BUILD_JOBS: "1"
93+
SP1_SKIP_PROGRAM_BUILD: true
94+
run: |
95+
cargo build --bin ${BIN_NAME} --release --target x86_64-apple-darwin
9196
92-
# - name: Build (release)
93-
# working-directory: ${{ env.CRATE_PATH }}
94-
# env:
95-
# CC_x86_64_apple_darwin: clang
96-
# CXX_x86_64_apple_darwin: clang++
97-
# CXXFLAGS_x86_64_apple_darwin: -std=c++17
98-
# run: |
99-
# cargo build --bin ${BIN_NAME} --release --target x86_64-apple-darwin
97+
# - name: Package artifact
98+
# run: |
99+
# set -euo pipefail
100+
# VERSION="${GITHUB_REF_NAME#v}"
101+
# TARGET="x86_64-apple-darwin"
102+
# BIN="target/${TARGET}/release/${{ env.BIN_NAME }}"
103+
# OUT=dist && mkdir -p "$OUT"
104+
# PKG="${{ env.BIN_NAME }}-${VERSION}-${TARGET}.tar.gz"
105+
# tar -czf "${OUT}/${PKG}" -C "$(dirname "$BIN")" "$(basename "$BIN")"
106+
# (cd "$OUT" && shasum -a 256 "$PKG" > "${PKG}.sha256")
100107

101-
# - name: Package artifact
102-
# run: |
103-
# set -euo pipefail
104-
# VERSION="${GITHUB_REF_NAME#v}"
105-
# TARGET="x86_64-apple-darwin"
106-
# BIN="target/${TARGET}/release/${{ env.BIN_NAME }}"
107-
# OUT=dist && mkdir -p "$OUT"
108-
# PKG="${{ env.BIN_NAME }}-${VERSION}-${TARGET}.tar.gz"
109-
# tar -czf "${OUT}/${PKG}" -C "$(dirname "$BIN")" "$(basename "$BIN")"
110-
# (cd "$OUT" && shasum -a 256 "$PKG" > "${PKG}.sha256")
108+
- name: Upload to Release
109+
uses: softprops/action-gh-release@v2
110+
with:
111+
tag_name: ${{ github.ref_name }}
112+
files: |
113+
${{ github.workspace }}/target/${{ runner.os }}-x86_64-apple-darwin-${{ github.run_id }}/x86_64-apple-darwin/release/${{ env.BIN_NAME }}
111114
112-
# - name: Upload to Release
113-
# uses: softprops/action-gh-release@v2
114-
# with:
115-
# tag_name: ${{ github.ref_name }}
116-
# files: |
117-
# dist/*.tar.gz
118-
# dist/*.sha256
119115
macos-arm64:
120116
runs-on: macos-14 # Apple Silicon runner
121117
steps:
@@ -124,20 +120,13 @@ jobs:
124120
with:
125121
targets: aarch64-apple-darwin
126122

127-
- name: Install SP1 toolchain
128-
run: |
129-
curl -L https://sp1up.succinct.xyz | bash
130-
~/.sp1/bin/sp1up
131-
~/.sp1/bin/cargo-prove prove --version
132-
source ~/.bashrc
133-
134123
- name: Build (release)
135124
working-directory: ${{ env.CRATE_PATH }}
136125
env:
137126
CC_aarch64_apple_darwin: clang
138127
CXX_aarch64_apple_darwin: clang++
139128
CXXFLAGS_aarch64_apple_darwin: -std=c++17
140-
CARGO_TARGET_DIR: ${{ github.workspace }}/target/${{ runner.os }}-${{ matrix.target }}-${{ github.run_id }}
129+
CARGO_TARGET_DIR: ${{ github.workspace }}/target/${{ runner.os }}-aarch64-apple-darwin-${{ github.run_id }}
141130
CARGO_BUILD_JOBS: "1"
142131
SP1_SKIP_PROGRAM_BUILD: true
143132
run: |
@@ -148,7 +137,7 @@ jobs:
148137
# set -euo pipefail
149138
# VERSION="${GITHUB_REF_NAME#v}"
150139
# TARGET="aarch64-apple-darwin"
151-
# BIN="${{ github.workspace }}/target/${{ runner.os }}-${{ matrix.target }}-${{ github.run_id }}"
140+
# BIN="${{ github.workspace }}/target/${{ runner.os }}-aarch64-apple-darwin-${{ github.run_id }}"
152141
# OUT=dist && mkdir -p "$OUT"
153142
# PKG="${{ env.BIN_NAME }}-${VERSION}-${TARGET}.tar.gz"
154143
# tar -czf "${OUT}/${PKG}" -C "$(dirname "$BIN")" "$(basename "$BIN")"
@@ -159,4 +148,4 @@ jobs:
159148
with:
160149
tag_name: ${{ github.ref_name }}
161150
files: |
162-
${{ github.workspace }}/target/${{ runner.os }}-${{ matrix.target }}-${{ github.run_id }}/${{ matrix.target }}/release/${{ env.BIN_NAME }}
151+
${{ github.workspace }}/target/${{ runner.os }}-aarch64-apple-darwin-${{ github.run_id }}/aarch64-apple-darwin/release/${{ env.BIN_NAME }}

0 commit comments

Comments
 (0)