From 4e5dccce89196c1158775de8a169cf3a721bc5fb Mon Sep 17 00:00:00 2001 From: Mike Date: Fri, 29 Jan 2021 13:42:56 -0700 Subject: [PATCH] ci: update build --- .github/workflows/build_all.yml | 23 +++++++++++++++-------- .github/workflows/ci.yml | 8 +++----- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index d9d3b20..1214b42 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -9,7 +9,7 @@ on: workflow_dispatch: inputs: build_type: - description: 'Build Type can be "debug" or "release"' + description: 'Build Type can be "debug" or "release".' required: true default: "release" @@ -45,12 +45,19 @@ jobs: run: cd build && cmake --build . --config Debug - name: Build RPC (Release) if: ${{ github.event.inputs.build_type }} == "release" - run: cd build && cmake --build . + run: cd build && cmake --build . --config Release - name: GitHub Upload Release Artifacts + if: ${{ github.event.inputs.build_type }} == "release" uses: actions/upload-artifact@v2 with: - name: RPC_Windows_${{github.event.inputs.build_type}}.exe - path: ${{ runner.workspace }}\rpc\build\${{github.event.inputs.build_type}}\rpc.exe + name: RPC_Windows_release.exe + path: ${{ runner.workspace }}\rpc\build\Release\rpc.exe + - name: GitHub Upload Release Artifacts + if: ${{ github.event.inputs.build_type }} == "debug" + uses: actions/upload-artifact@v2 + with: + name: RPC_Windows_debug.exe + path: ${{ runner.workspace }}\rpc\build\Debug\rpc.exe build-linux: runs-on: ${{ matrix.os }} @@ -79,12 +86,12 @@ jobs: run: ls && cd vcpkg && ls shell: bash - name: Prepare for build - run: cd build && cmake .. -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/rpc/vcpkg/scripts/buildsystems/vcpkg.cmake - - name: Build RPC (Debug) if: ${{ github.event.inputs.build_type }} == "debug" - run: cd build && cmake --build . --config Debug - - name: Build RPC (Release) + run: cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/rpc/vcpkg/scripts/buildsystems/vcpkg.cmake + - name: Prepare for build if: ${{ github.event.inputs.build_type }} == "release" + run: cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/rpc/vcpkg/scripts/buildsystems/vcpkg.cmake + - name: Build RPC run: cd build && cmake --build . - name: GitHub Upload Release Artifacts uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b1b4b5..1834b42 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,8 +70,6 @@ jobs: run: ls && cd vcpkg && ls shell: bash - name: Prepare for build - run: cd build && cmake .. -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/rpc/vcpkg/scripts/buildsystems/vcpkg.cmake - - name: Build RPC (Release) - run: cd build && cmake --build . --config Release - - name: Build RPC (Release) - run: cd build && cmake --build . --config Debug \ No newline at end of file + run: cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/rpc/vcpkg/scripts/buildsystems/vcpkg.cmake + - name: Build RPC + run: cd build && cmake --build .