Skip to content

Commit

Permalink
Merge pull request #52 from oblivioncth/dev
Browse files Browse the repository at this point in the history
Merge to master for v0.9.4
  • Loading branch information
oblivioncth authored Mar 17, 2023
2 parents d56ea15 + b6cb9f6 commit 10a6399
Show file tree
Hide file tree
Showing 73 changed files with 241 additions and 378 deletions.
63 changes: 35 additions & 28 deletions .github/workflows/build-clifp-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,40 @@ jobs:
build-clifp:
name: Build CLIFp - Linux (Release)
strategy:
fail-fast: false
matrix:
qt_linkage: [static]
os: [ubuntu-20.04, ubuntu-22.04]
compiler: [gcc, clang]
lib_linkage: [shared, static]
include:
- os: ubuntu-20.04
compiler: gcc
c_comp: gcc-10
cxx_comp: g++-10
qt_comp: clang12
- os: ubuntu-20.04
compiler: clang
c_comp: clang-12
cxx_comp: clang++-12
qt_comp: clang12
- os: ubuntu-22.04
compiler: gcc
c_comp: gcc-12
cxx_comp: g++-12
qt_comp: clang14
- os: ubuntu-22.04
compiler: clang
c_comp: clang-14
cxx_comp: clang++-14
qt_comp: clang14
- lib_linkage: shared
cmake_bsl: ON
- lib_linkage: static
cmake_bsl: OFF
runs-on: ${{ matrix.os }}
env:
cmake_gen: Ninja Multi-Config
steps:
- name: Set matrix derived variables
uses: kanga333/variable-mapper@v0.3.0
with:
key: ${{ matrix.os }}
map: |
{
"ubuntu-20.04": {
"c_comp": "clang-12",
"cxx_comp": "clang++-12",
"qt_version": "6.4.2",
"qt_compiler": "clang12"
},
"ubuntu-22.04": {
"c_comp": "clang-14",
"cxx_comp": "clang++-14",
"qt_version": "6.4.2",
"qt_compiler": "clang14"
}
}
export_to: env,log
- name: Set derived variables with shell because GitHub Actions env context sucks
run: |
echo "clifp_package_path=${{ env.clifp_build_dir }}/out/dist" >> $GITHUB_ENV
Expand All @@ -51,10 +58,10 @@ jobs:
- name: Install Qt (custom build)
uses: oblivioncth/actions/general/install-and-cache-qt-from-ffynnon@dev
with:
version: ${{ env.qt_version }}
version: 6.4.2
os: linux
compiler: ${{ env.qt_compiler }}
linkage: ${{ matrix.qt_linkage }}
compiler: ${{ matrix.qt_comp }}
linkage: ${{ matrix.lib_linkage }}
path: ${{ env.qt_install_dir }}
credentials: ${{ secrets.qt_ffynnon_cred }}
- name: Update package index
Expand All @@ -81,20 +88,20 @@ jobs:
working-directory: ${{ env.clifp_src_dir }}
run: |
echo Configuring CMake...
"$qt_cmake" -G "$cmake_gen" -S "$clifp_src_dir" -B "$clifp_build_dir" -D CMAKE_CXX_COMPILER="$cxx_comp" -D CMAKE_C_COMPILER="$c_comp"
"$qt_cmake" -G "$cmake_gen" -S "$clifp_src_dir" -B "$clifp_build_dir" -D BUILD_SHARED_LIBS="${{ matrix.cmake_bsl }}" -D CMAKE_CXX_COMPILER="${{ matrix.cxx_comp }}" -D CMAKE_C_COMPILER="${{ matrix.c_comp }}"
echo Changing to build directory...
cd "$clifp_build_dir"
echo Building CLIFp Release...
cmake --build . --target all --config Release
echo Installing CLIFp Release
cmake --build . --target install --config Release
cmake --install . --config Release
echo Packaging CLIFp...
cpack -C "Debug;Release"
cpack -C "Release"
echo Build complete.
- name: Get CLIFp artifact name
run: |
cpack_name=$(find "${{ env.clifp_package_path }}" -type f -name "*.zip")
artifact_name="$(basename "$cpack_name" .zip) [${{ matrix.os }}]"
artifact_name="$(basename "$cpack_name" .zip) [${{ matrix.cxx_comp }}]"
echo "current_artifact_name=$artifact_name" >> $GITHUB_ENV
- name: Upload CLIFp build artifact
uses: actions/upload-artifact@v3
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/build-clifp-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
required: true
env:
qt_install_dir: ${{ github.workspace }}/Qt/Install
qt_download_dir: ${{ github.workspace }}/Qt/Download
clifp_src_suffix: CLIFp/Source
clifp_src_dir: ${{ github.workspace }}/CLIFp/Source
clifp_build_dir: ${{ github.workspace }}/CLIFp/Build
Expand All @@ -16,8 +15,14 @@ jobs:
build-clifp:
name: Build CLIFp - Windows (Release)
strategy:
fail-fast: false
matrix:
qt_linkage: [static]
lib_linkage: [shared, static]
include:
- lib_linkage: shared
cmake_bsl: ON
- lib_linkage: static
cmake_bsl: OFF
runs-on: windows-latest
env:
vs_dir: C:/Program Files/Microsoft Visual Studio/2022/Enterprise
Expand All @@ -32,10 +37,10 @@ jobs:
- name: Install Qt (custom build)
uses: oblivioncth/actions/general/install-and-cache-qt-from-ffynnon@dev
with:
version: 6.4.0
version: 6.4.2
os: windows
compiler: msvc2022
linkage: ${{ matrix.qt_linkage }}
linkage: ${{ matrix.lib_linkage }}
path: ${{ env.qt_install_dir }}
credentials: ${{ secrets.qt_ffynnon_cred }}
- name: Checkout CLIFp
Expand All @@ -50,16 +55,19 @@ jobs:
echo "Setup C++ Build Environment..."
CALL "${{ env.vs_dir }}\Common7\Tools\VsDevCmd.bat" -arch=amd64
echo "Configure CMake using Qt wrapper..."
CALL "${{ env.qt_cmake }}" -G "${{ env.cmake_gen }}" -S "${{ env.clifp_src_dir}}" -B "${{ env.clifp_build_dir }}"
CALL "${{ env.qt_cmake }}" -G "${{ env.cmake_gen }}" -S "${{ env.clifp_src_dir}}" -B "${{ env.clifp_build_dir }}" -D BUILD_SHARED_LIBS=${{ matrix.cmake_bsl }}
echo "Changing to build directory..."
cd "%clifp_build_dir%"
echo "Building CLIFp release..."
cmake --build . --target all --config Release
echo "Installing CLIFp Release..."
cmake --build . --target install --config Release
cmake --install . --config Release
echo "Packaging CLIFp..."
cpack -C "Release"
echo "Build complete."
- name: Remove VC Runtime Redistributable Added by Qt # Required until an option to disable this is added to Qt
run: |
Remove-Item "${{ env.clifp_install_path }}/bin/vc_redist*"
- name: Get CLIFp artifact name
run: |
$artifact_name=$((Get-ChildItem -Path "${{ env.clifp_package_path }}" -Filter *.zip)[0].BaseName)
Expand Down
Loading

0 comments on commit 10a6399

Please sign in to comment.