Skip to content

Commit f42d5e4

Browse files
chore: add GitHub Actions workflow for cross-platform builds
1 parent d5047c7 commit f42d5e4

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Build VectorJS
2+
3+
on:
4+
push:
5+
branches: [ "main", "master" ]
6+
pull_request:
7+
branches: [ "main", "master" ]
8+
9+
jobs:
10+
build-linux:
11+
name: Build on Ubuntu Linux
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
- name: Install Linux Dependencies
17+
run: |
18+
sudo apt-get update
19+
sudo apt-get install -y build-essential cmake g++-13 libasound2-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama-dev
20+
- name: Configure CMake
21+
env:
22+
CXX: g++-13
23+
run: >
24+
cmake -B ${{ github.workspace }}/build
25+
-DCMAKE_BUILD_TYPE=Release
26+
-DCMAKE_CXX_STANDARD=23
27+
- name: Build Target
28+
run: cmake --build ${{ github.workspace }}/build --config Release
29+
- name: Verify Executable Production
30+
run: ls -l ${{ github.workspace }}/build/vectorjs
31+
32+
build-windows:
33+
name: Build on Windows
34+
runs-on: windows-latest
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@v4
38+
- name: Configure CMake
39+
run: >
40+
cmake -B ${{ github.workspace }}/build
41+
-DCMAKE_BUILD_TYPE=Release
42+
-DCMAKE_CXX_STANDARD=23
43+
- name: Build Target
44+
run: cmake --build ${{ github.workspace }}/build --config Release
45+
- name: Verify Executable Production
46+
shell: bash
47+
run: ls -l ${{ github.workspace }}/build/Release/vectorjs.exe
48+
49+
build-mac:
50+
name: Build on macOS
51+
runs-on: macos-latest
52+
steps:
53+
- name: Checkout repository
54+
uses: actions/checkout@v4
55+
- name: Configure CMake
56+
run: >
57+
cmake -B ${{ github.workspace }}/build
58+
-DCMAKE_BUILD_TYPE=Release
59+
-DCMAKE_CXX_STANDARD=23
60+
- name: Build Target
61+
run: cmake --build ${{ github.workspace }}/build --config Release
62+
- name: Verify Executable Production
63+
run: ls -l ${{ github.workspace }}/build/vectorjs

0 commit comments

Comments
 (0)