📷 A modern, cross-platform, 2D Graphics library for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

92 lines
3.1 KiB

name: Build
on:
push:
branches:
- master
tags:
- "v*"
pull_request:
branches:
- master
jobs:
Build:
strategy:
matrix:
opts:
# - os: ubuntu-latest
# framework: netcoreapp2.1
# runtime: linux-x64
# cover: false
- os: windows-latest
framework: netcoreapp2.1
runtime: win-x64
cover: true
- os: windows-latest
framework: net472
runtime: win-x64
cover: false
- os: windows-latest
framework: net472
runtime: win-x86
cover: false
runs-on: ${{ matrix.opts.os }}
steps:
- uses: actions/checkout@v1
- name: Install nuget
uses: NuGet/setup-nuget@v1
- name: Enable long file paths
run: |
git config --global core.autocrlf false
git config --global core.longpaths true
- name: Update Submodules
run: git submodule -q update --init --recursive
- name: Build
shell: pwsh
run: |
$DebugPreference = "Continue"
./build.ps1 "${{matrix.opts.framework}}"
- name: Test no Coverage
if: matrix.opts.cover == false
run: dotnet test **/*tests/*.csproj -c Release -f "${{matrix.opts.framework}}" -r "${{matrix.opts.runtime}}" --no-build --filter Sandbox
- name: Test with Coverage
if: matrix.opts.cover == true
run: dotnet test **/*tests/*.csproj -c Release -f "${{matrix.opts.framework}} -r "${{matrix.opts.runtime}}" --no-build --filter Sandbox /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
- name: Update Codecov
uses: iansu/codecov-action-node@v1.0.0
if: matrix.opts.cover == true
with:
token: ${{secrets.CODECOV_TOKEN}}
file: "coverage.xml"
flags: unittests
# Publish:
# runs-on: windows-latest
# needs: [Build]
# if: github.event_name == 'push'
# steps:
# - uses: actions/checkout@v1
# - name: install nuget
# uses: NuGet/setup-nuget@v1
# - name: Enable long file paths
# run: git config --global core.longpaths true
# - name: Update submodules
# run: git submodule -q update --init --recursive
# - name: Build
# shell: pwsh
# run: |
# $DebugPreference = "Continue"
# ./build.ps1
# - name: Publish to nightly feed -myget
# if: success()
# run: nuget.exe push .\artifacts\*.nupkg ${{secrets.MYGET_TOKEN}} -Source https://www.myget.org/F/sixlabors/api/v2/package
# TODO: if github.ref starts with 'refs/tags' then it was tag push and we can optionally push out package to nuget.org