Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
modernize-loop-convert,
modernize-make-shared,
modernize-make-unique,
modernize-redundant-void-arg,
modernize-redundant-void-arg, #SDL3 headers
modernize-replace-random-shuffle,
modernize-shrink-to-fit,
modernize-use-bool-literals,
Expand All @@ -69,7 +69,7 @@
modernize-use-equals-default,
modernize-use-equals-delete,
modernize-use-noexcept,
modernize-use-nullptr,
modernize-use-nullptr, #SDL3 headers
modernize-use-override,
modernize-use-transparent-functors,
readability-redundant-member-init'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
cmake -Bbuild
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake"
-DVCPKG_TARGET_TRIPLET=x64-windows-static-md
-DYML=YML
build: cmake --build build --parallel "$env:NUMBER_OF_PROCESSORS"

steps:
Expand Down
208 changes: 208 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
name: Desktop builds

on:
push:
branches: [main, 'port/**']
tags: ['v*']
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
formatting:
name: Check formatting
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- run: |
files=$(git diff --name-only --diff-filter=ACMRT HEAD^ -- \
'src/*.cpp' 'src/*.h' 'src/*.mm')
if [ -n "$files" ]; then
clang-format --dry-run --Werror -style=file $files
fi

windows:
name: Windows x64
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Configure
shell: pwsh
run: |
cmake -B out/build/windows-release -G Ninja `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" `
-DVCPKG_TARGET_TRIPLET=x64-windows-static-md
- name: Build
run: cmake --build out/build/windows-release --parallel
- name: Smoke test
run: out/build/windows-release/src/System/ArrowVortex.exe --smoke-test
- name: Install
run: cmake --install out/build/windows-release --prefix out/install/windows
- uses: actions/upload-artifact@v4
with:
name: ArrowVortex-windows-x64
path: out/install/windows

linux:
name: Linux x86_64
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install system build dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build pkg-config xvfb libgl1-mesa-dev \
libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev \
libxfixes-dev libxss-dev libwayland-dev libxkbcommon-dev \
libasound2-dev libpulse-dev libdbus-1-dev libibus-1.0-dev \
libdecor-0-dev libpipewire-0.3-dev nasm autoconf automake libtool
- name: Configure
run: |
cmake -B out/build/linux-release -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" \
-DVCPKG_TARGET_TRIPLET=x64-linux
- name: Build and test
run: |
cmake --build out/build/linux-release --parallel
SDL_AUDIODRIVER=dummy xvfb-run -a \
out/build/linux-release/src/System/ArrowVortex --smoke-test
ctest --test-dir out/build/linux-release --output-on-failure
- name: Install and package
run: |
cmake --install out/build/linux-release --prefix out/install/linux
tools/package_linux.sh out/install/linux out/packages
- uses: actions/upload-artifact@v4
with:
name: ArrowVortex-linux-x86_64
path: |
out/packages/ArrowVortex-linux-x86_64.tar.gz
out/packages/ArrowVortex-linux-x86_64.tar.gz.sha256

macos:
name: macOS ${{ matrix.arch }}
strategy:
fail-fast: false
matrix:
include:
- arch: arm64
runner: macos-15
preset: macos-arm64-release
- arch: x86_64
runner: macos-15-intel
preset: macos-x64-release
runs-on: ${{ matrix.runner }}
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: microsoft/vcpkg
path: vcpkg
ref: a62ce77d56ee07513b4b67de1ec2daeaebfae51a
- name: Install macOS build tools
run: brew install nasm
- name: Bootstrap vcpkg
run: ./vcpkg/bootstrap-vcpkg.sh -disableMetrics
- name: Configure and build
run: |
cmake --preset ${{ matrix.preset }}
cmake --build --preset ${{ matrix.preset }} --parallel
- name: Smoke test
run: |
app=out/build/${{ matrix.preset }}/src/System/ArrowVortex.app
smoke_result="$RUNNER_TEMP/arrowvortex-smoke-${{ matrix.arch }}"
rm -f "$smoke_result"
open -W -n "$app" --args --smoke-test --smoke-result "$smoke_result"
grep -qx success "$smoke_result"
ctest --test-dir out/build/${{ matrix.preset }} --output-on-failure
- name: Validate architecture and bundle
run: |
app=out/build/${{ matrix.preset }}/src/System/ArrowVortex.app
lipo -archs "$app/Contents/MacOS/ArrowVortex" | grep -qw ${{ matrix.arch }}
plutil -lint "$app/Contents/Info.plist"
test -d "$app/Contents/Resources/assets"
test -d "$app/Contents/Resources/noteskins"
test -d "$app/Contents/Resources/settings"
ditto -c -k --keepParent "$app" "ArrowVortex-macOS-${{ matrix.arch }}.zip"
- uses: actions/upload-artifact@v4
with:
name: ArrowVortex-macOS-${{ matrix.arch }}
path: ArrowVortex-macOS-${{ matrix.arch }}.zip

universal-macos:
name: Universal 2 package
needs: [macos]
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: ArrowVortex-macOS-*
path: out/architectures
- name: Assemble Universal 2 bundle
run: |
ditto -x -k out/architectures/ArrowVortex-macOS-arm64/ArrowVortex-macOS-arm64.zip out/arm64
ditto -x -k out/architectures/ArrowVortex-macOS-x86_64/ArrowVortex-macOS-x86_64.zip out/x86_64
tools/merge_macos_universal.sh out/arm64/ArrowVortex.app \
out/x86_64/ArrowVortex.app out/ArrowVortex.app
ditto -c -k --keepParent out/ArrowVortex.app out/ArrowVortex-Universal2.zip
- name: Create ad-hoc-signed DMG
run: tools/package_macos.sh out/ArrowVortex.app out/packages
- uses: actions/upload-artifact@v4
with:
name: ArrowVortex-macOS-Universal2
path: |
out/packages/ArrowVortex-macOS-Universal2.dmg
out/packages/ArrowVortex-macOS-Universal2.dmg.sha256
out/ArrowVortex-Universal2.zip

signed-release:
name: Sign and notarize release
if: startsWith(github.ref, 'refs/tags/')
needs: [windows, linux, universal-macos]
runs-on: macos-15
environment: release
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: ArrowVortex-macOS-Universal2
path: out/download
- name: Import Developer ID certificate
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
run: |
test -n "$MACOS_CERTIFICATE"
keychain=build.keychain-db
security create-keychain -p temporary "$keychain"
security default-keychain -s "$keychain"
security unlock-keychain -p temporary "$keychain"
echo "$MACOS_CERTIFICATE" | base64 --decode > certificate.p12
security import certificate.p12 -k "$keychain" -P "$MACOS_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple: -s -k temporary "$keychain"
- name: Sign, notarize, and verify
env:
MACOS_SIGN_IDENTITY: ${{ secrets.MACOS_SIGN_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_APP_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }}
run: |
ditto -x -k out/download/ArrowVortex-Universal2.zip out/app
tools/package_macos.sh out/app/ArrowVortex.app out/release
- name: Publish release assets
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload "${GITHUB_REF_NAME}" out/release/* --clobber
69 changes: 0 additions & 69 deletions .github/workflows/windows.yml

This file was deleted.

83 changes: 62 additions & 21 deletions BUILDING.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,72 @@
# Building
# Building ArrowVortex

## Windows
ArrowVortex uses CMake 3.28+, Ninja, and the pinned vcpkg manifest in
`vcpkg.json`. Set `VCPKG_ROOT` to a vcpkg checkout before using a release
preset.

Prerequsites:
* Installation of Visual Studio Build Tools
* CMake (available with VS Build Tools)
* vcpkg (available with VS Build Tools)
* `VCPKG_ROOT` environment variable pointing at vcpkg installation folder
## macOS

### With CMake CLI
With Developer PowerShell open at root folder of this project run:
```pwsh
cmake -Bbuild -S. -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static-md
cmake --build build
The supported deployment target is macOS 12.0. Release builds use static
vcpkg triplets so the app bundle does not depend on Homebrew or build-tree
paths.

```sh
cmake --preset macos-arm64-release
cmake --build --preset macos-arm64-release --parallel
```

Use `macos-x64-release` on an Intel Mac. For local Apple Silicon development
with Homebrew dependencies, use `macos-local-debug`. The app is emitted under
`out/build/<preset>/src/System/ArrowVortex.app`.

The CI workflow builds both native architectures on matching GitHub-hosted
runners, merges Mach-O files with `lipo`, validates both slices, signs the app,
and creates a DMG. Tagged builds use Developer ID and notarization only when
the protected release environment provides the documented secrets.

## Linux

Install the SDL build prerequisites listed in `.github/workflows/release.yml`,
then run:

```sh
cmake --preset linux-release
cmake --build --preset linux-release --parallel
ctest --test-dir out/build/linux-release --output-on-failure
cmake --install out/build/linux-release --prefix out/install/linux
tools/package_linux.sh out/install/linux out/packages
```
Resulting binary will be located at `build/src/System/Debug/ArrowVortex.exe`

To install ArrowVortex to a folder run:
Ubuntu 22.04 is the release baseline. The supported Linux release artifact is
the x86_64 tarball produced by the packaging script.

## Windows

From Developer PowerShell with Ninja and vcpkg available:

```pwsh
cmake --install build --prefix "<your_folder_here>"
cmake --preset windows-release
cmake --build --preset windows-release --parallel
ctest --test-dir out/build/windows-release --output-on-failure
```

### With Visual Studio
1. Run `vcpkg integrate install` in Developer PowerShell. This will integrate vcpkg with your installation of Visual Studio and needs to be run once.
2. Open root folder of this project in Visual Studio
## Tests

`--smoke-test [fixture]` initializes SDL video, OpenGL 2.1, audio, the editor,
and optional simfile input, renders 120 frames, and exits. CTest also performs
load-save-reload checks for SM, SSC, osu!, and DWI fixtures, including BPM
changes, repeated stops at BPM boundaries, warps, holds, and Unicode metadata.

## Release secrets

Store these only in GitHub's protected `release` environment:

- `MACOS_CERTIFICATE` (base64-encoded Developer ID Application PKCS#12)
- `MACOS_CERTIFICATE_PASSWORD`
- `MACOS_SIGN_IDENTITY`
- `APPLE_ID`
- `APPLE_TEAM_ID`
- `APPLE_APP_PASSWORD` (app-specific password)

## Troubleshooting
### CMake can't find freetype
CMake failed to integrate with vcpkg. Remove your build directory (either `build/` or `out/`) and follow instructions for your system.
Without them, CI still produces ad-hoc-signed Universal 2 artifacts. A tagged
notarized release is intentionally blocked until all signing values exist.
Loading