-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f5c681
commit fbb8a88
Showing
8 changed files
with
273 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Build CMake Project | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
cmake-preset: | ||
required: true | ||
type: string | ||
upload-artifact-dll: | ||
required: false | ||
type: string | ||
default: false | ||
upload-artifact-dll-pdb: | ||
required: false | ||
type: string | ||
default: false | ||
upload-artifact-vdf: | ||
required: false | ||
type: string | ||
default: false | ||
msvc-toolkit: | ||
required: false | ||
type: string | ||
default: 14.39 | ||
project-version: | ||
required: false | ||
type: string | ||
default: false | ||
|
||
jobs: | ||
build: | ||
name: MSVC / Windows 2022 | ||
runs-on: windows-2022 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- uses: TheMrMilchmann/setup-msvc-dev@v3 | ||
with: | ||
arch: x86 | ||
toolset: ${{ inputs.msvc-toolkit }} | ||
export-path-to-vcvarsall: VCVARSALL | ||
- name: CMake Setup | ||
uses: lukka/get-cmake@latest | ||
- name: Set project version | ||
if: ${{ inputs.project-version != 'false' }} | ||
run: powershell ./set-version.ps1 ${{ inputs.project-version }} | ||
- name: CMake Configure | ||
run: cmake --preset ${{ inputs.cmake-preset }} | ||
- name: Ninja Build | ||
run: ninja -C out/build/${{ inputs.cmake-preset }} -j 20 | ||
- name: CMake Install | ||
run: cmake --install out/build/${{ inputs.cmake-preset }} --prefix out/install/${{ inputs.cmake-preset }} | ||
- name: Archive DLL | ||
if: ${{ inputs.upload-artifact-dll != 'false' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.upload-artifact-dll }} | ||
path: out/install/${{ inputs.cmake-preset }}/bin/*.dll | ||
- name: Archive DLL PDB | ||
uses: actions/upload-artifact@v4 | ||
if: ${{ inputs.upload-artifact-dll-pdb != 'false' }} | ||
with: | ||
name: ${{ inputs.upload-artifact-dll-pdb }} | ||
path: | | ||
out/build/${{ inputs.cmake-preset }}/*.dll | ||
out/build/${{ inputs.cmake-preset }}/*.pdb | ||
- name: Archive VDF | ||
uses: actions/upload-artifact@v4 | ||
if: ${{ inputs.upload-artifact-vdf != 'false' }} | ||
with: | ||
name: ${{ inputs.upload-artifact-vdf }} | ||
path: out/install/${{ inputs.cmake-preset }}/*.vdf |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: On Push | ||
permissions: write-all | ||
|
||
on: | ||
push: | ||
branches: [ "main", "dev", "gh_actions" ] | ||
paths-ignore: | ||
- 'README.md' | ||
- 'docs/**' | ||
|
||
jobs: | ||
build-debug: | ||
name: Build Debug | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
cmake-preset: x86-debug | ||
upload-artifact-dll: debug-dll | ||
upload-artifact-dll-pdb: debug-dll-pdb | ||
upload-artifact-vdf: debug-vdf | ||
|
||
build-release: | ||
name: Build Release | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
cmake-preset: x86-release | ||
upload-artifact-dll: release-dll | ||
upload-artifact-vdf: release-vdf | ||
|
||
build-release-pdb: | ||
name: Build Release (Debug Symbols) | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
cmake-preset: x86-release-pdb | ||
upload-artifact-dll-pdb: release-dll-pdb | ||
upload-artifact-vdf: release-vdf-pdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Release | ||
permissions: write-all | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build-release: | ||
name: Build Release | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
cmake-preset: x86-release | ||
upload-artifact-dll: release-dll | ||
upload-artifact-vdf: release-vdf | ||
project-version: ${{ github.ref_name }} | ||
|
||
build-release-pdb: | ||
name: Build Release (Debug Symbols) | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
cmake-preset: x86-release-pdb | ||
upload-artifact-dll-pdb: release-dll-pdb | ||
upload-artifact-vdf: release-vdf-pdb | ||
project-version: ${{ github.ref_name }} | ||
|
||
publish: | ||
name: Publish Release | ||
runs-on: windows-2022 | ||
needs: | ||
- build-release | ||
- build-release-pdb | ||
steps: | ||
- name: Download Release DLL | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: release-dll | ||
path: out/install/x86-release/bin/ | ||
- name: Download Release VDF | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: release-vdf | ||
path: out/install/x86-release/ | ||
- name: Download Release DLL PDB | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: release-dll-pdb | ||
path: out/build/x86-release-pdb/ | ||
- name: Download Release DLL VDF | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: release-vdf-pdb | ||
path: out/install/x86-release-pdb/ | ||
- name: Prepare Release Files | ||
id: prepare-release | ||
shell: powershell | ||
env: | ||
GITHUB_REF: ${{ github.ref_name }} | ||
run: | | ||
$tag = $env:GITHUB_REF -replace '^refs/tags/', '' | ||
Compress-Archive out/install/x86-release/bin/* zBassMusic-${tag}.zip | ||
Compress-Archive out/build/x86-release-pdb/* zBassMusic-${tag}-pdb.zip | ||
Copy-Item out/install/x86-release/zBassMusic.vdf zBassMusic-${tag}.vdf | ||
Copy-Item out/install/x86-release-pdb/zBassMusic.vdf zBassMusic-${tag}-pdb.vdf | ||
$draft = -not ($tag -match '^v?(\d+\.\d+\.\d+)$') | ||
$env:GITHUB_OUTPUT = "draft=${draft}`ntag=${tag}" | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | ||
generate_release_notes: true | ||
draft: ${{ steps.prepare-release.outputs.draft }} | ||
prerelease: ${{ steps.prepare-release.outputs.draft }} | ||
files: | | ||
zBassMusic-${{ steps.prepare-release.outputs.tag }}.zip | ||
zBassMusic-${{ steps.prepare-release.outputs.tag }}.vdf | ||
zBassMusic-${{ steps.prepare-release.outputs.tag }}-pdb.zip | ||
zBassMusic-${{ steps.prepare-release.outputs.tag }}-pdb.vdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.