diff --git a/.github/workflows/build_emscripten.yml b/.github/workflows/build_emscripten.yml index 4edb75a7e..90aee914f 100644 --- a/.github/workflows/build_emscripten.yml +++ b/.github/workflows/build_emscripten.yml @@ -1,4 +1,4 @@ -name: emscripten +name: Emscripten on: push: @@ -13,7 +13,7 @@ on: jobs: build: - name: emscripten_build + name: Static Library runs-on: ubuntu-latest steps: @@ -63,5 +63,5 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v3 with: - name: projectm-emscripten-latest + name: projectm-emscripten-static-latest path: install/* \ No newline at end of file diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 350578699..32d6a3b13 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -1,4 +1,4 @@ -name: linux_x64 +name: Ubuntu Linux (x86_64) on: push: @@ -12,8 +12,8 @@ on: - "*" jobs: - build: - name: linux_build + build-shared: + name: Shared Library runs-on: ubuntu-latest steps: @@ -25,7 +25,7 @@ jobs: sudo apt-get install -y libgl1-mesa-dev mesa-common-dev libsdl2-dev libglm-dev llvm-dev libgtest-dev libgmock-dev ninja-build - name: Configure Build - run: cmake -G "Ninja Multi-Config" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_TESTING=YES + run: cmake -G "Ninja Multi-Config" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=YES - name: Build Debug run: cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --parallel @@ -44,5 +44,40 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v3 with: - name: projectm-linux-latest - path: install/* \ No newline at end of file + name: projectm-linux-shared-latest + path: install/* + + build-static: + name: Static Library + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install Packages + run: | + sudo apt-get update + sudo apt-get install -y libgl1-mesa-dev mesa-common-dev libsdl2-dev libglm-dev llvm-dev libgtest-dev libgmock-dev ninja-build + + - name: Configure Build + run: cmake -G "Ninja Multi-Config" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=YES + + - name: Build Debug + run: cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --parallel + + - name: Run Unit Tests + run: ctest --test-dir "${{ github.workspace }}/cmake-build" --verbose --build-config "Debug" + + - name: Build Release + run: cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --parallel + + - name: Install + run: | + cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --target install + cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --target install + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: projectm-linux-static-latest + path: install/* diff --git a/.github/workflows/build_osx.yml b/.github/workflows/build_osx.yml index 72f3efe5a..e5e2e0dae 100644 --- a/.github/workflows/build_osx.yml +++ b/.github/workflows/build_osx.yml @@ -1,4 +1,4 @@ -name: osx_x64 +name: macOS (x86_64) on: push: @@ -12,8 +12,8 @@ on: - "*" jobs: - build: - name: osx_build + build-shared: + name: Shared Library runs-on: macos-latest steps: @@ -23,7 +23,7 @@ jobs: run: brew install sdl2 ninja googletest - name: Configure Build - run: cmake -G "Ninja Multi-Config" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_TESTING=YES + run: cmake -G "Ninja Multi-Config" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=YES - name: Build Debug run: cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --parallel @@ -42,5 +42,38 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v3 with: - name: projectm-osx-latest - path: install/* \ No newline at end of file + name: projectm-osx-shared-latest + path: install/* + + build-static: + name: Static Library + runs-on: macos-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install Packages + run: brew install sdl2 ninja googletest + + - name: Configure Build + run: cmake -G "Ninja Multi-Config" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=YES + + - name: Build Debug + run: cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --parallel + + - name: Run Unit Tests + run: ctest --test-dir "${{ github.workspace }}/cmake-build" --verbose --build-config "Debug" + + - name: Build Release + run: cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --parallel + + - name: Install + run: | + cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --target install + cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --target install + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: projectm-osx-static-latest + path: install/* diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 5675798bf..704eaf9cf 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -1,4 +1,4 @@ -name: windows_x64 +name: Windows (x64) on: push: @@ -12,8 +12,8 @@ on: - "*" jobs: - build: - name: windows_build + build-shared: + name: Shared Library runs-on: windows-latest steps: @@ -23,7 +23,7 @@ jobs: run: vcpkg --triplet=x64-windows install glew gtest - name: Configure Build (MD) - run: cmake -G "Visual Studio 17 2022" -A "X64" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$:Debug>DLL" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_TESTING=YES + run: cmake -G "Visual Studio 17 2022" -A "X64" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$:Debug>DLL" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=YES - name: Build Debug run: cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --parallel @@ -42,5 +42,38 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v3 with: - name: projectm-windows-latest - path: install/* \ No newline at end of file + name: projectm-windows-shared-latest + path: install/* + + build-static: + name: Static Library + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install Dependencies + run: vcpkg --triplet=x64-windows-static install glew gtest + + - name: Configure Build (MD) + run: cmake -G "Visual Studio 17 2022" -A "X64" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$:Debug>" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=YES + + - name: Build Debug + run: cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --parallel + + - name: Run Unit Tests + run: ctest --test-dir "${{ github.workspace }}/cmake-build" --verbose --build-config "Debug" + + - name: Build Release + run: cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --parallel + + - name: Install + run: | + cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --target INSTALL + cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --target INSTALL + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: projectm-windows-static-latest + path: install/*