Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
nschimme authored Dec 6, 2024
1 parent f10ad98 commit 51b16d6
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,35 +99,32 @@ jobs:
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install openssl --version=1.1.1.2100
- if: runner.os == 'Windows'
run: xcopy "C:\Program Files\OpenSSL" "C:\OpenSSL" /E /I /H /K /Y


#
# Build
#
- if: runner.os == 'Windows' && matrix.compiler == 'msvc'
name: Build MMapper for Windows (MSVC)
shell: pwsh
run: |
mkdir ${{ github.workspace }}/artifact
mkdir build
cd build
cmake --version
cmake -DCMAKE_BUILD_TYPE=Debug -G "NMake Makefiles" -DCPACK_PACKAGE_DIRECTORY=${{ github.workspace }}\artifact -DUSE_UNITY_BUILD=false -DCMAKE_PREFIX_PATH="C:\Qt\5.12.2\msvc2019_64" -DOPENSSL_ROOT_DIR="C:/OpenSSL/" -S .. || exit -1
cmake --build . -j %NUMBER_OF_PROCESSORS%
- if: runner.os == 'Windows' && matrix.compiler == 'gcc'
name: Build MMapper for Windows (MinGW)
- if: runner.os == 'Windows'
name: Build MMapper for Windows
shell: pwsh
run: |
mkdir ${{ github.workspace }}/artifact
xcopy "C:\Program Files\OpenSSL" "C:\OpenSSL" /E /I /H /K /Y
mkdir $env:GITHUB_WORKSPACE/artifact
mkdir build
cd build
cmake --version
echo "C:/Qt/Tools/mingw1310_64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
set PATH=C:\Qt\Tools\mingw1310_64\bin;%PATH%
cmake -DCMAKE_BUILD_TYPE=Debug -G "MinGW Makefiles" -DCPACK_PACKAGE_DIRECTORY=${{ github.workspace }}\artifact -DUSE_UNITY_BUILD=false -DCMAKE_PREFIX_PATH="C:\Qt\5.12.2\mingw81_64" -DOPENSSL_ROOT_DIR="C:/OpenSSL/" -S .. || exit -1
cmake --build . -j %NUMBER_OF_PROCESSORS%
# Compiler-specific logic
if ('${{ matrix.compiler }}' -eq 'msvc') {
$generator = "NMake Makefiles"
$qtPath = "C:\Qt\5.12.2\msvc2019_64"
} elseif ('${{ matrix.compiler }}' -eq 'gcc') {
$generator = "MinGW Makefiles"
$qtPath = "C:\Qt\5.12.2\mingw81_64"
echo "C:/Qt/Tools/mingw1310_64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
$env:PATH = "C:\Qt\Tools\mingw1310_64\bin;$env:PATH"
}
cmake -DCMAKE_BUILD_TYPE=Debug -G $generator -DCPACK_PACKAGE_DIRECTORY=$env:GITHUB_WORKSPACE/artifact -DUSE_UNITY_BUILD=false -DCMAKE_PREFIX_PATH=$qtPath -DOPENSSL_ROOT_DIR=C:/OpenSSL/ -S .. || exit -1
cmake --build . -j $env:NUMBER_OF_PROCESSORS
- if: runner.os == 'Linux' || runner.os == 'macOS'
name: Build MMapper for Linux and Mac
run: |
Expand Down

0 comments on commit 51b16d6

Please sign in to comment.