Skip to content

Commit 64b7ea8

Browse files
authored
Update build workflow for multi-platform support
1 parent f10655f commit 64b7ea8

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build Binaries
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
name: Build for ${{ matrix.os }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
include:
17+
- os: ubuntu-latest
18+
artifact_name: bbfmux-linux
19+
binary_name: bbfmux
20+
compile_cmd: g++ -std=c++17 src/bbfenc.cpp src/libbbf.cpp src/xxhash.c -o bbfmux -pthread
21+
- os: windows-latest
22+
artifact_name: bbfmux-windows
23+
binary_name: bbfmux.exe
24+
compile_cmd: g++ -std=c++17 src/bbfenc.cpp src/libbbf.cpp src/xxhash.c -o bbfmux.exe -municode
25+
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v4
29+
30+
- name: Compile (Linux)
31+
if: runner.os == 'Linux'
32+
run: ${{ matrix.compile_cmd }}
33+
34+
- name: Compile (Windows)
35+
if: runner.os == 'Windows'
36+
run: ${{ matrix.compile_cmd }}
37+
38+
- name: Upload Artifact
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: ${{ matrix.artifact_name }}
42+
path: ${{ matrix.binary_name }}

0 commit comments

Comments
 (0)