Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

housekeeping: Update CI to do samples as well #293

Merged
merged 2 commits into from
Dec 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/build-samples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Sample Build

on:
push:
branches: [ main ]
paths:
- 'Sample/**'
pull_request:
branches: [ main ]
paths:
- 'Sample/**'

jobs:
build-samples:
strategy:
matrix:
configuration: [Debug, Release]

runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
lfs: true

# Install the .NET Core workload
- name: Install .NET Core 3.1.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x

- name: Install .NET 5.0.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.0.2

- name: Restore/Build the sample
run: msbuild SextantSample.sln /t:restore,build /maxcpucount /p:NoPackageAnalysis=true /verbosity:minimal /p:Configuration=$env:Configuration
working-directory: Sample
env:
Configuration: ${{ matrix.configuration }}
27 changes: 22 additions & 5 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ name: Build
on:
push:
branches: [ main ]
paths:
- 'src/**'
- 'version.json'
pull_request:
types: [opened, synchronize, reopened, closed]
branches: [ main ]

paths:
- 'src/**'
- 'version.json'

env:
configuration: Release
productNamespacePrefix: "Sextant"
Expand All @@ -21,12 +27,25 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
lfs: true

- name: Install .NET Core
- name: Install .NET Core 3.1.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x

- name: Install .NET 5.0.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x

- name: Add MSBuild to PATH
uses: glennawatson/setup-msbuild@v1.0.3

- name: Update VS2019
shell: powershell
run: Start-Process -Wait -PassThru -FilePath "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" -ArgumentList "update --passive --norestart --installpath ""C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise"""

- name: NBGV
id: nbgv
uses: dotnet/nbgv@master
Expand All @@ -36,9 +55,6 @@ jobs:
- name: NuGet Restore
run: dotnet restore
working-directory: src

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1

- name: Build
run: msbuild /t:build,pack /maxcpucount /p:NoPackageAnalysis=true /verbosity:minimal /p:Configuration=${{ env.configuration }}
Expand Down Expand Up @@ -120,3 +136,4 @@ jobs:
SOURCE_URL: https://api.nuget.org/v3/index.json
run: |
dotnet nuget push -s ${{ env.SOURCE_URL }} -k ${{ env.NUGET_AUTH_TOKEN }} **/*.nupkg