Skip to content

Commit 628c5be

Browse files
committed
Configure macOS release build in GitHub Actions and bump version to 1.1.0.2
1 parent 2bd83cd commit 628c5be

3 files changed

Lines changed: 55 additions & 43 deletions

File tree

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,44 @@ jobs:
5454
build/GPUBench-*-win64.exe
5555
env:
5656
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
58+
build-macos:
59+
runs-on: macos-latest
60+
steps:
61+
- name: Checkout repository
62+
uses: actions/checkout@v3
63+
64+
- name: Install Vulkan SDK
65+
uses: humbletim/install-vulkan-sdk@v1
66+
with:
67+
version: latest
68+
cache: false
69+
70+
- name: Install Rust
71+
uses: dtolnay/rust-toolchain@stable
72+
73+
- name: Configure CMake
74+
run: |
75+
mkdir build
76+
cd build
77+
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="GPUBench"
78+
79+
- name: Build C++ Target
80+
run: |
81+
cd build
82+
cmake --build . --config Release
83+
84+
- name: Package with CPack
85+
run: |
86+
cd build
87+
cpack -G DragNDrop -C Release
88+
cpack -G TGZ -C Release
89+
90+
- name: Upload to Release
91+
uses: softprops/action-gh-release@v1
92+
with:
93+
files: |
94+
build/GPUBench-*-Darwin.dmg
95+
build/GPUBench-*-Darwin.tar.gz
96+
env:
97+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set(CMAKE_CXX_STANDARD 17)
66
set(CMAKE_CXX_STANDARD_REQUIRED ON)
77

88
# Versioning
9-
set(BUILD_NUMBER "1") # Build number for the project
9+
set(BUILD_NUMBER "2") # Build number for the project
1010
set(PROJECT_FULL_VERSION "${PROJECT_VERSION}.${BUILD_NUMBER}")
1111

1212

RELEASING.md

Lines changed: 13 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,24 @@ This document describes how GPUBench builds and publishes releases for different
55
## Release Architecture
66

77
GPUBench uses a hybrid release process:
8-
1. **Windows Binaries**: Built and published automatically in the cloud via GitHub Actions.
8+
1. **Windows & macOS Binaries**: Built and published automatically in the cloud via GitHub Actions.
99
2. **Linux Packages**: Built locally on the development machine and uploaded manually using the GitHub CLI (`gh`).
1010

1111
---
1212

13-
## 1. Windows Releases (Automated)
13+
## 1. Windows & macOS Releases (Automated)
1414

15-
Windows binaries are handled by the GitHub Actions workflow in `.github/workflows/release.yml`.
15+
Windows and macOS binaries are handled by the GitHub Actions workflow in `.github/workflows/release.yml`.
1616

17-
- **Trigger**: Pushing a tag matching `v*` (e.g. `v1.1.0.1`).
17+
- **Trigger**: Pushing a tag matching `v*` (e.g. `v1.1.0.2`).
1818
- **Generated Assets**:
19-
- `GPUBench-*-win64.zip` (Portable ZIP)
20-
- `GPUBench-*-win64.exe` (NSIS Installer)
19+
- Windows: `GPUBench-*-win64.zip` and `GPUBench-*-win64.exe`
20+
- macOS: `GPUBench-*-Darwin.dmg` and `GPUBench-*-Darwin.tar.gz`
2121
- **Workflow**:
2222
1. Commit changes and update the `BUILD_NUMBER` in `CMakeLists.txt`.
23-
2. Tag the commit (e.g., `git tag v1.1.0.1`).
24-
3. Push the tag to remote (`git push origin v1.1.0.1`).
25-
4. The GitHub Actions runner will automatically build, package, and publish the Windows binaries to the release page.
23+
2. Tag the commit (e.g., `git tag v1.1.0.2`).
24+
3. Push the tag to remote (`git push origin v1.1.0.2`).
25+
4. The GitHub Actions runner will automatically build, package, and publish the Windows and macOS binaries to the release page.
2626

2727
---
2828

@@ -55,38 +55,9 @@ Upload the generated assets directly to the existing GitHub release page using t
5555

5656
```bash
5757
# Upload assets to the corresponding tag
58-
gh release upload v1.1.0.1 \
59-
build/GPUBench-1.1.0.1-Linux.deb \
60-
build/GPUBench-1.1.0.1-Linux.rpm \
61-
build/GPUBench-1.1.0.1-Linux.tar.gz \
62-
--clobber
63-
```
64-
65-
---
66-
67-
## 3. macOS Releases (Local macOS Machine)
68-
69-
If you compile for macOS, those packages (DMG, Tarball) are built locally on a macOS machine and uploaded manually using the GitHub CLI.
70-
71-
### Step 1: Build and Package Locally
72-
```bash
73-
# Navigate to the build directory
74-
cd build
75-
76-
# Configure and compile release targets
77-
cmake .. -DCMAKE_BUILD_TYPE=Release
78-
cmake --build . --parallel $(sysctl -n hw.ncpu)
79-
80-
# Generate DMG installer and tarball
81-
cpack -G DragNDrop
82-
cpack -G TGZ
83-
```
84-
85-
### Step 2: Upload to GitHub Release
86-
```bash
87-
# Upload assets to the corresponding tag
88-
gh release upload v1.1.0.1 \
89-
build/GPUBench-1.1.0.1-Darwin.dmg \
90-
build/GPUBench-1.1.0.1-Darwin.tar.gz \
58+
gh release upload v1.1.0.2 \
59+
build/GPUBench-1.1.0.2-Linux.deb \
60+
build/GPUBench-1.1.0.2-Linux.rpm \
61+
build/GPUBench-1.1.0.2-Linux.tar.gz \
9162
--clobber
9263
```

0 commit comments

Comments
 (0)