From ecc31a25f7d4e5f3de15a6d397a11626d6b465e3 Mon Sep 17 00:00:00 2001 From: Mike Date: Thu, 28 Jan 2021 13:41:34 -0700 Subject: [PATCH 1/4] ci: add support for release or debug Signed-off-by: Mike --- .github/workflows/build.yml | 82 ---------------------------- .github/workflows/build_all.yml | 94 +++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 10 ++-- 3 files changed, 101 insertions(+), 85 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/build_all.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index a03cdf7..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,82 +0,0 @@ -#********************************************************************* -# Copyright (c) Intel Corporation 2020 -# SPDX-License-Identifier: Apache-2.0 -#*********************************************************************/ - -name: Build RPC (Native) - -on: - workflow_dispatch: - -env: - BUILD_TYPE: Release - -jobs: - - build-windows: - runs-on: windows-2019 - steps: - - uses: actions/checkout@v2 - - name: Create Build Dir - run: mkdir build - - name: Clone - run: git clone --branch 2020.11-1 https://github.com/microsoft/vcpkg.git - - name: Build VCPKG - run: cd vcpkg && bootstrap-vcpkg.bat - shell: cmd - - name: dir - run: ls - - name: dir - run: cd vcpkg && ls - - name: Install C++ REST SDK - run: ${{ runner.workspace }}\rpc\vcpkg\vcpkg.exe install cpprestsdk[websockets]:x64-windows-static - shell: cmd - - name: dir - run: ls && cd vcpkg && ls - shell: bash - - name: Prepare for build - run: cd build && cmake .. -DCMAKE_PREFIX_PATH=D:/a/rpc/rpc/vcpkg/installed/x64-windows-static -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=D:/a/rpc/rpc/vcpkg/scripts/buildsystems/vcpkg.cmake - - name: Build RPC - run: cd build && cmake --build . --config Debug - - name: GitHub Upload Release Artifacts - uses: actions/upload-artifact@v2 - with: - name: RPC_Windows.exe - path: ${{ runner.workspace }}\rpc\build\Debug\rpc.exe - - build-linux: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-18.04, ubuntu-20.04] - steps: - - uses: actions/checkout@v2 - - name: Install Dependencies - run: sudo apt install git cmake build-essential curl zip unzip tar pkg-config - - name: Create Build Dir - run: mkdir build - - name: Clone - run: git clone --branch 2020.11-1 https://github.com/microsoft/vcpkg.git - - name: Build VCPKG - run: cd vcpkg && ./bootstrap-vcpkg.sh - shell: bash - - name: dir - run: ls - - name: dir - run: cd vcpkg && ls - - name: Install C++ REST SDK - run: ${{ runner.workspace }}/rpc/vcpkg/vcpkg install cpprestsdk[websockets] - shell: bash - - name: dir - 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 - run: cd build && cmake --build . --config Debug - - name: GitHub Upload Release Artifacts - uses: actions/upload-artifact@v2 - with: - name: RPC_Linux_${{ matrix.os }} - path: | - build/rpc diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml new file mode 100644 index 0000000..fab9dac --- /dev/null +++ b/.github/workflows/build_all.yml @@ -0,0 +1,94 @@ +#********************************************************************* +# Copyright (c) Intel Corporation 2020 +# SPDX-License-Identifier: Apache-2.0 +#*********************************************************************/ + +name: Build RPC (Native) + +on: + workflow_dispatch: + inputs: + build_type: + description: 'Build Type can be "debug" or "release"' + required: true + default: "release" + +env: + BUILD_TYPE: ${{github.event.inputs.build_type}} + +jobs: + build-windows: + runs-on: windows-2019 + steps: + - uses: actions/checkout@v2 + - name: Create Build Dir + run: mkdir build + - name: Clone + run: git clone --branch 2020.11-1 https://github.com/microsoft/vcpkg.git + - name: Build VCPKG + run: cd vcpkg && bootstrap-vcpkg.bat + shell: cmd + - name: dir + run: ls + - name: dir + run: cd vcpkg && ls + - name: Install C++ REST SDK + run: ${{ runner.workspace }}\rpc\vcpkg\vcpkg.exe install cpprestsdk[websockets]:x64-windows-static + shell: cmd + - name: dir + run: ls && cd vcpkg && ls + shell: bash + - name: Prepare for build + run: cd build && cmake .. -DCMAKE_PREFIX_PATH=D:/a/rpc/rpc/vcpkg/installed/x64-windows-static -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=D:/a/rpc/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) + if: ${{ github.event.inputs.build_type == "release" }} + run: cd build && cmake --build . + - name: GitHub Upload Release Artifacts + uses: actions/upload-artifact@v2 + with: + name: RPC_Windows.exe + path: ${{ runner.workspace }}\rpc\build\${{github.event.inputs.build_type}}\rpc_${{github.event.inputs.build_type}}.exe + + build-linux: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-18.04, ubuntu-20.04] + steps: + - uses: actions/checkout@v2 + - name: Install Dependencies + run: sudo apt install git cmake build-essential curl zip unzip tar pkg-config + - name: Create Build Dir + run: mkdir build + - name: Clone + run: git clone --branch 2020.11-1 https://github.com/microsoft/vcpkg.git + - name: Build VCPKG + run: cd vcpkg && ./bootstrap-vcpkg.sh + shell: bash + - name: dir + run: ls + - name: dir + run: cd vcpkg && ls + - name: Install C++ REST SDK + run: ${{ runner.workspace }}/rpc/vcpkg/vcpkg install cpprestsdk[websockets] + shell: bash + - name: dir + 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) + if: ${{ github.event.inputs.build_type == "release" }} + run: cd build && cmake --build . + - name: GitHub Upload Release Artifacts + uses: actions/upload-artifact@v2 + with: + name: RPC_Linux_${{ matrix.os }} + path: | + build/rpc_${{github.event.inputs.build_type}} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f79d83..5b1b4b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,9 @@ jobs: shell: bash - name: Prepare for build run: cd build && cmake .. -DCMAKE_PREFIX_PATH=D:/a/rpc/rpc/vcpkg/installed/x64-windows-static -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=D:/a/rpc/rpc/vcpkg/scripts/buildsystems/vcpkg.cmake - - name: Build RPC + - name: Build RPC (Release) + run: cd build && cmake --build . --config Release + - name: Build RPC (Release) run: cd build && cmake --build . --config Debug @@ -69,5 +71,7 @@ jobs: shell: bash - name: Prepare for build run: cd build && cmake .. -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/rpc/vcpkg/scripts/buildsystems/vcpkg.cmake - - name: Build RPC - run: cd build && cmake --build . --config Debug + - 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 From 6433a553a0f52d6638c4a4787c34404d847b1306 Mon Sep 17 00:00:00 2001 From: Mike Date: Thu, 28 Jan 2021 14:43:19 -0700 Subject: [PATCH 2/4] Merge pull request #11 from rsdmike/releaseOption ci: add support for release or debug --- .github/workflows/build_all.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index fab9dac..d9d3b20 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -3,7 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 #*********************************************************************/ -name: Build RPC (Native) +name: Build RPC (Native) Debug/Release on: workflow_dispatch: @@ -41,16 +41,16 @@ jobs: - name: Prepare for build run: cd build && cmake .. -DCMAKE_PREFIX_PATH=D:/a/rpc/rpc/vcpkg/installed/x64-windows-static -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=D:/a/rpc/rpc/vcpkg/scripts/buildsystems/vcpkg.cmake - name: Build RPC (Debug) - if: ${{ github.event.inputs.build_type == "debug" }} + if: ${{ github.event.inputs.build_type }} == "debug" run: cd build && cmake --build . --config Debug - name: Build RPC (Release) - if: ${{ github.event.inputs.build_type == "release" }} + if: ${{ github.event.inputs.build_type }} == "release" run: cd build && cmake --build . - name: GitHub Upload Release Artifacts uses: actions/upload-artifact@v2 with: - name: RPC_Windows.exe - path: ${{ runner.workspace }}\rpc\build\${{github.event.inputs.build_type}}\rpc_${{github.event.inputs.build_type}}.exe + name: RPC_Windows_${{github.event.inputs.build_type}}.exe + path: ${{ runner.workspace }}\rpc\build\${{github.event.inputs.build_type}}\rpc.exe build-linux: runs-on: ${{ matrix.os }} @@ -81,14 +81,14 @@ jobs: - 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" }} + if: ${{ github.event.inputs.build_type }} == "debug" run: cd build && cmake --build . --config Debug - name: Build RPC (Release) - if: ${{ github.event.inputs.build_type == "release" }} + if: ${{ github.event.inputs.build_type }} == "release" run: cd build && cmake --build . - name: GitHub Upload Release Artifacts uses: actions/upload-artifact@v2 with: - name: RPC_Linux_${{ matrix.os }} + name: RPC_Linux_${{ matrix.os }}_${{github.event.inputs.build_type}} path: | - build/rpc_${{github.event.inputs.build_type}} + build/rpc From 4e5dccce89196c1158775de8a169cf3a721bc5fb Mon Sep 17 00:00:00 2001 From: Mike Date: Fri, 29 Jan 2021 13:42:56 -0700 Subject: [PATCH 3/4] 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 . From 41a1be5249f81750c97dd4039d9be4228ce952ce Mon Sep 17 00:00:00 2001 From: Mike Date: Fri, 29 Jan 2021 13:42:56 -0700 Subject: [PATCH 4/4] ci: update build --- .github/workflows/build_all.yml | 23 +++++++++++++++-------- .github/workflows/ci.yml | 10 ++++------ 2 files changed, 19 insertions(+), 14 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..cb5e962 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: run: cd build && cmake .. -DCMAKE_PREFIX_PATH=D:/a/rpc/rpc/vcpkg/installed/x64-windows-static -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=D:/a/rpc/rpc/vcpkg/scripts/buildsystems/vcpkg.cmake - name: Build RPC (Release) run: cd build && cmake --build . --config Release - - name: Build RPC (Release) + - name: Build RPC (Debug) run: cd build && cmake --build . --config Debug @@ -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 .