Skip to content

Commit

Permalink
Add GitHub Actions build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
aixxe committed Oct 18, 2024
1 parent 0d45524 commit b2c7fd9
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build

on: [push]

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up cache
uses: actions/cache@v3
with:
path: cache
key: build
restore-keys: build

- name: Configure project
run: cmake -DCPM_SOURCE_CACHE=cache -S . -B build

- name: Build project
run: cmake --build build --config Release

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: release-artifacts
path: build/Release/playlister3.dll

- name: Create release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/Release/playlister3.dll
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ include(cmake/GetGitRevisionDescription.cmake)

get_git_head_revision(GIT_REFSPEC GIT_COMMIT_HASH)

if (NOT GIT_REFSPEC)
set(GIT_REFSPEC "release")
endif()

string(REPLACE "refs/heads/" "" GIT_BRANCH_NAME ${GIT_REFSPEC})
string(SUBSTRING ${GIT_COMMIT_HASH} 0 8 GIT_COMMIT_HASH_SHORT)

set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

CPMAddPackage(
NAME spdlog
GIT_TAG v1.11.0
Expand Down

0 comments on commit b2c7fd9

Please sign in to comment.