-
Notifications
You must be signed in to change notification settings - Fork 0
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
JungerBoyo
authored and
JungerBoyo
committed
Jun 26, 2023
1 parent
c1c1d90
commit e38e0a0
Showing
9 changed files
with
121 additions
and
0 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,61 @@ | ||
name: ci | ||
|
||
on: | ||
release: | ||
types: [published] | ||
push: | ||
tags: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- windows-2022 | ||
- ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Windows setup | ||
if: runner.os == 'Windows' | ||
run: winget install cmake | ||
run: winget install llvm | ||
run: winget install pip | ||
run: winget install ninja | ||
|
||
- name: Linux setup | ||
if: runner.os == 'Ubuntu' | ||
run: sudo apt-get install cmake | ||
run: sudo apt-get install llvm | ||
run: sudo apt-get install pip | ||
run: sudo apt-get install ninja | ||
|
||
- name: Install conan package manager | ||
run: pip install conan | ||
|
||
- name: Install conan packages | ||
run: conan install . --output-folder=build-rel | ||
|
||
- name: CMake config | ||
run: cmake -S . -B build-rel -G Ninja -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release | ||
|
||
- name: CMake build | ||
run: cmake --build build-rel | ||
|
||
- name: CPack project | ||
if: startsWith(github.ref, 'refs/tags') | ||
working-directory: build-rel | ||
run: cpack -G ZIP --config CPackConfig.cmake | ||
|
||
- name: Publish release | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: build-rel/*.zip | ||
|
||
|
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,4 @@ | ||
*.code-workspace | ||
CMakeUserPresets.json | ||
build-rel/ | ||
.vscode/ |
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,38 @@ | ||
cmake_minimum_required(VERSION 3.20) | ||
|
||
### before-project config ### | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
||
############################# | ||
|
||
|
||
### project setup ### | ||
|
||
project(VE001 | ||
VERSION 0.0.1 | ||
HOMEPAGE_URL "https://github.com/JungerBoyo/VE-001" | ||
) | ||
|
||
###################### | ||
|
||
|
||
### sub dirs ### | ||
|
||
add_subdirectory(shaders) | ||
add_subdirectory(src) | ||
|
||
################ | ||
|
||
### add conan install as dependency ### | ||
|
||
|
||
### package project ### | ||
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION "./") | ||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/shaders/bin DESTINATION "shaders/") | ||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/shaders/src DESTINATION "shaders/") | ||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/assets/textures DESTINATION "assets/") | ||
|
||
include(CPack) | ||
######################## |
Empty file.
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,3 @@ | ||
conan install . --output-folder=build-rel && \ | ||
cmake -S . -B build-rel -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release && \ | ||
cmake --build build-rel |
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,6 @@ | ||
[requires] | ||
fmt/8.1.1 | ||
|
||
[generators] | ||
CMakeDeps | ||
CMakeToolchain |
Empty file.
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,4 @@ | ||
find_package(fmt REQUIRED) | ||
|
||
add_executable(${PROJECT_NAME} main.cpp) | ||
target_link_libraries(${PROJECT_NAME} fmt::fmt) |
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,5 @@ | ||
#include <fmt/core.h> | ||
|
||
int main() { | ||
fmt::print("Hello {}!", "Woorld"); | ||
} |