go to v4 #22
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
name: Build | |
on: | |
push: | |
jobs: | |
build-project: | |
name: Linux Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install PugiXML | |
run: sudo apt-get install libpugixml-dev | |
- name: Install GLFW | |
run: sudo apt-get install libglfw3-dev | |
- name: Install Assimp | |
run: sudo apt-get install libassimp-dev | |
- name: Checkout | |
uses: actions/checkout@v4.1.2 | |
- name: Configure and Build Project | |
uses: threeal/cmake-action@main | |
with: | |
c-compiler: clang | |
cxx-compiler: clang++ | |
source-dir: ./src | |
options: -DCMAKE_BUILD_TYPE=Release | |
- name: Copy assets | |
run: cp -r ./Assets ./src/build/Assets | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Linux release | |
path: ./src/build | |
build-project-windows: | |
name: Windows Build | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.1.2 | |
- name: vcpkg build | |
uses: johnwason/vcpkg-action@v6 | |
id: vcpkg | |
with: | |
manifest-dir: ../src/ | |
triplet: x64-windows-release | |
token: ${{ github.token }} | |
github-binarycache: true | |
- name: Cmake Configure | |
run: cmake ${{ steps.vcpkg.outputs.vcpkg-cmake-config }} -DCMAKE_BUILD_TYPE=Release -S ./src -B ./src/build | |
- name: Cmake Build | |
working-directory: ./src | |
run: cmake --build ./build | |
- name: Copy assets | |
run: cp -r ./Assets ./src/build/Assets | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Windows release | |
path: ./src/build |