Skip to content

Allow loading of projects that are missing imports. (#206) #616

Allow loading of projects that are missing imports. (#206)

Allow loading of projects that are missing imports. (#206) #616

Workflow file for this run

name: Build for multiple SDK versions
on:
push:
branches:
- main
pull_request:
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
dotnet-version: ["", "6.0.x", "7.0.x"]
# these entries will mesh with the above combinations
include:
# just use what's in the repo
- global-json-file: "global.json"
dotnet-version: ""
include-prerelease: false
label: "repo global.json"
build_net7: false
globaljson-command: "dotnet new globaljson --sdk-version 6.0.400"
# latest 6.0 stable
- global-json-file: "global.json"
dotnet-version: "6.0.x"
include-prerelease: false
label: "6.0 stable"
build_net7: false
globaljson-command: "dotnet new globaljson --sdk-version 6.0.0 --roll-forward latestMinor"
# latest 7.0 preview
- global-json-file: "global.json"
dotnet-version: "7.0.x"
include-prerelease: true
label: "7.0 preview"
build_net7: true
globaljson-command: "dotnet new globaljson --sdk-version 7.0.0 --roll-forward latestMinor"
fail-fast: false # we have timing issues on some OS, so we want them all to run
runs-on: ${{ matrix.os }}
timeout-minutes: 15
name: Build on ${{matrix.os}} for ${{ matrix.label }}
steps:
- uses: actions/checkout@v3
# setup .NET per the repo global.json
- name: Setup .NET
uses: actions/setup-dotnet@v2
# setup .NET per test session
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
include-prerelease: ${{ matrix.include-prerelease }}
global-json-file: ${{ matrix.global-json-file }}
dotnet-version: ${{ matrix.dotnet-version }}
# remove global.json, create new one to protect against CI machine installed defaults. Then the env configuration takes precedence
- name: Purge global.json
run: |
rm global.json
${{ matrix.globaljson-command }}
# let's make sure we're on the version we think we are.
- name: Announce .NET version
run: dotnet --info
- name: Restore tools
run: dotnet tool restore
- name: Run build and test
run: dotnet run --project build
env:
BuildNet7: ${{ matrix.build_net7 }}
- name: Archive test results
uses: actions/upload-artifact@v3
with:
name: test-results
path: test/**/TestResults/*.trx