1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-24 00:48:41 -05:00

Github action for MSVC build (3)

This commit is contained in:
f4exb 2021-10-15 14:25:22 +02:00
parent 456c293326
commit 4ecdee76de

View File

@ -1,10 +1,53 @@
# https://stackoverflow.com/questions/69126323/github-actions-creating-releases-for-multiple-branches-in-a-single-workflow # https://stackoverflow.com/questions/69126323/github-actions-creating-releases-for-multiple-branches-in-a-single-workflow
# https://gist.github.com/NickNaso/0d478f1481686d5bcc868cac06620a60 # https://gist.github.com/NickNaso/0d478f1481686d5bcc868cac06620a60
name: SDRangel CI name: SDRangel CI/CD
on: [push] on: [push]
jobs: 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: build:
name: ${{ matrix.config.name }} name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }} runs-on: ${{ matrix.config.os }}
@ -29,11 +72,16 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: true submodules: true
fetch-depth: 0
- name: Print env - name: Print env
run: | run: |
echo github.event.action: ${{ github.event.action }} echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }} echo github.event_name: ${{ github.event_name }}
echo github.ref: ${{ github.ref }} 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 - name: Install basic dependencies on Windows
if: startsWith(matrix.config.os, 'windows') if: startsWith(matrix.config.os, 'windows')
run: | run: |
@ -76,3 +124,14 @@ jobs:
mkdir build && cd build 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 .. -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 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