diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c74bd1..8d1dc86 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,8 @@ name: Build permissions: id-token: write contents: read +env: + BUILD_TYPE: Release jobs: build: name: "Build" @@ -18,12 +20,10 @@ jobs: config: - os: ubuntu-latest artifact: "Linux-x64.zip" - mode: "Release" - conan-install-cmd: conan install conanfile-linux.txt -s compiler.cppstd=20 --build missing + conan-install-cmd: conan install conanfile-linux.txt -s compiler.cppstd=20 --build missing --install-folder=${{github.workspace}}/build - os: windows-latest artifact: "Windows-x64.zip" - mode: "Release" - conan-install-cmd: conan install conanfile-windows.txt -s compiler.cppstd=20 --build missing + conan-install-cmd: conan install conanfile-windows.txt -s compiler.cppstd=20 --build missing --install-folder=${{github.workspace}}/build fail-fast: false steps: - name: "Checkout" @@ -36,15 +36,14 @@ jobs: run: conan profile detect --force - name: "Install Conan" run: ${{ matrix.config.conan-install-cmd }} - - name: "CMake Load Cache" - working-directory: ./build - run: cmake .. + - name: "CMake Configuration" + run: cmake -B ${{github.workspace}}/build -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - name: "CMake Build" - run: cmake --build . --config ${{ matrix.config.mode }} + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - name: "CMake Install" - run: cmake --install build --prefix instdir --strip + run: cmake --install build --prefix ${{github.workspace}}/install --strip - name: Upload uses: actions/upload-artifact@v1 with: - path: ./${{ matrix.config.artifact }} - name: ${{ matrix.config.artifact }}-${{ matrix.config.mode }} + path: ${{github.workspace}}/install + name: ${{ matrix.config.artifact }}-${{env.BUILD_TYPE}}