Skip to content

Commit 76f298d

Browse files
authored
add macos binary to release (#192)
* add macos binary to release * Update release.yml * remove pr trigger
1 parent 1d93ec7 commit 76f298d

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

.github/workflows/release.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,16 @@ jobs:
4848
${{ matrix.name }}_srtool_output.json
4949
5050
build-node:
51-
runs-on: ubuntu-latest
51+
strategy:
52+
matrix:
53+
include:
54+
- os: ubuntu-latest
55+
target: x86_64-unknown-linux-gnu
56+
artifact_name: polkadot-bulletin-chain-linux
57+
- os: macos-14
58+
target: aarch64-apple-darwin
59+
artifact_name: polkadot-bulletin-chain-macos-aarch64
60+
runs-on: ${{ matrix.os }}
5261
steps:
5362
- name: Checkout
5463
uses: actions/checkout@v4
@@ -59,19 +68,29 @@ jobs:
5968
targets: wasm32-unknown-unknown
6069
components: rust-src
6170

62-
- name: Install system dependencies
71+
- name: Install system dependencies (Linux)
72+
if: runner.os == 'Linux'
6373
run: |
6474
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list /etc/apt/sources.list.d/azure-cli.list
6575
sudo apt-get update
6676
sudo apt-get install -y protobuf-compiler libclang-dev
6777
78+
- name: Install system dependencies (macOS)
79+
if: runner.os == 'macOS'
80+
run: |
81+
brew install protobuf llvm
82+
LLVM_PATH=$(brew --prefix llvm)
83+
echo "LIBCLANG_PATH=$LLVM_PATH/lib" >> $GITHUB_ENV
84+
echo "LDFLAGS=-L$LLVM_PATH/lib" >> $GITHUB_ENV
85+
echo "CPPFLAGS=-I$LLVM_PATH/include" >> $GITHUB_ENV
86+
6887
- name: Build polkadot-bulletin-chain binary
6988
run: cargo build --profile production -p polkadot-bulletin-chain
7089

7190
- name: Upload polkadot-bulletin-chain binary
7291
uses: actions/upload-artifact@v4
7392
with:
74-
name: polkadot-bulletin-chain
93+
name: ${{ matrix.artifact_name }}
7594
path: target/production/polkadot-bulletin-chain
7695

7796
publish-release:
@@ -90,7 +109,8 @@ jobs:
90109
run: |
91110
mkdir -p release-assets
92111
find artifacts -name "*.wasm" -exec cp {} release-assets/ \;
93-
cp artifacts/polkadot-bulletin-chain/polkadot-bulletin-chain release-assets/
112+
cp artifacts/polkadot-bulletin-chain-linux/polkadot-bulletin-chain release-assets/polkadot-bulletin-chain-linux
113+
cp artifacts/polkadot-bulletin-chain-macos-aarch64/polkadot-bulletin-chain release-assets/polkadot-bulletin-chain-macos-aarch64
94114
ls -la release-assets/
95115
96116
- name: Add runtime info to changelog
@@ -128,5 +148,6 @@ jobs:
128148
with:
129149
files: |
130150
release-assets/*.wasm
131-
release-assets/polkadot-bulletin-chain
151+
release-assets/polkadot-bulletin-chain-linux
152+
release-assets/polkadot-bulletin-chain-macos-aarch64
132153
body_path: RELEASE_NOTES.md

0 commit comments

Comments
 (0)