Skip to content

Add artifact upload to github actions (#338) #58

Add artifact upload to github actions (#338)

Add artifact upload to github actions (#338) #58

Workflow file for this run

name: build
on:
pull_request:
release:
types: [published]
push:
tags:
branches:
- master
jobs:
Test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-latest
generator:
- "Visual Studio 17 2022"
arch:
- x64
- Win32
build_type:
- RelWithDebInfo
- Debug
compiler:
- msvc
package_generator:
- ZIP
steps:
- uses: actions/checkout@v2
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
compiler: ${{ matrix.compiler }}
vcvarsall: ${{ contains(matrix.os, 'windows' )}}
cmake: true
ninja: true
- name: Configure CMake
run: |
cmake -S . -B ./build -G "${{matrix.generator}}" -A "${{matrix.arch}}" -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}}
- name: Build
run: |
cmake --build ./build --target DSpellCheck --config ${{matrix.build_type}}
- name: Test
run: |
ctest --build-and-test . ./build --build-generator "${{matrix.generator}}"
- name: Upload Artifacts
if: matrix.build_type == 'RelWithDebInfo'
uses: actions/upload-artifact@v4
with:
name: DSpellCheck-${{matrix.arch}}
path: |
./build/${{matrix.build_type}}/DSpellCheck.dll
./build/${{matrix.build_type}}/DSpellCheck.pdb