From 4ecdee76dee802a688ca1241d53fb377d0e25bda Mon Sep 17 00:00:00 2001 From: f4exb Date: Fri, 15 Oct 2021 14:25:22 +0200 Subject: [PATCH] Github action for MSVC build (3) --- .github/workflows/sdrangel.yml | 61 +++++++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sdrangel.yml b/.github/workflows/sdrangel.yml index bb8e9b7bf..6cc6cf0c9 100644 --- a/.github/workflows/sdrangel.yml +++ b/.github/workflows/sdrangel.yml @@ -1,10 +1,53 @@ # https://stackoverflow.com/questions/69126323/github-actions-creating-releases-for-multiple-branches-in-a-single-workflow # https://gist.github.com/NickNaso/0d478f1481686d5bcc868cac06620a60 -name: SDRangel CI +name: SDRangel CI/CD on: [push] jobs: + test: + if: false + name: ${{ matrix.config.name }}-Test + runs-on: ${{ matrix.config.os }} + strategy: + fail-fast: false + matrix: + config: + - { + name: "Windows-x64", + WIN_ARCH: "x64", + os: windows-latest, + QT_INST_DIR: "C:/", + QTDIR: "C:/Qt/5.15.2/msvc2019_64", + QT_ARCH: win64_msvc2019_64, + boost_dl: "${{ github.workspace }}\\downloads\\boost", + lib_dir: "C:\\Libraries", + build_type: "Release", + archiver: "7z a", + generators: Ninja + } + steps: + - uses: actions/checkout@v2 + with: + submodules: true + fetch-depth: 0 + - name: Print env + run: | + echo github.event.action: ${{ github.event.action }} + echo github.event_name: ${{ github.event_name }} + echo github.ref: ${{ github.ref }} + echo github.workspace: ${{ github.workspace }} + - name: Get version + id: get_version + run: echo "::set-output name=version::$(git describe --tags | cut -c2-)" + - name: Create dummy artifact + run: echo "test" > ${{ github.workspace }}/test-${{ steps.get_version.outputs.version }}.txt + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: test-${{ steps.get_version.outputs.version }}.txt + path: ${{ github.workspace }}/test-${{ steps.get_version.outputs.version }}.txt + build: name: ${{ matrix.config.name }} runs-on: ${{ matrix.config.os }} @@ -29,11 +72,16 @@ jobs: - uses: actions/checkout@v2 with: submodules: true + fetch-depth: 0 - name: Print env run: | echo github.event.action: ${{ github.event.action }} echo github.event_name: ${{ github.event_name }} echo github.ref: ${{ github.ref }} + echo github.workspace: ${{ github.workspace }} + - name: Get version + id: get_version + run: echo "::set-output name=version::$(git describe --tags | cut -c2-)" - name: Install basic dependencies on Windows if: startsWith(matrix.config.os, 'windows') run: | @@ -76,3 +124,14 @@ jobs: mkdir build && cd build cmake .. -G "${{ matrix.config.generators }}" -DCMAKE_BUILD_TYPE=Release -DARCH_OPT=SSE4_2 -DDEBUG_OUTPUT=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DCMAKE_PREFIX_PATH="C:\Qt\5.15.2\msvc2019_64;C:\Libraries\boost_1_73_0" cmake --build . --config Release --target package + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: sdrangel-${{ steps.get_version.outputs.version }}-win64.exe + path: ${{ github.workspace }}/build/sdrangel-${{ steps.get_version.outputs.version }}-win64.exe + - name: Upload release + if: startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v1 + with: + files: ${{ github.workspace }}/build/sdrangel-${{ steps.get_version.outputs.version }}-win64.exe +