ci #133
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
merge_group: | |
workflow_dispatch: | |
env: | |
NUGET_PACKAGES: ${{ github.workspace }}/packages | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
jobs: | |
build: | |
uses: ./.github/workflows/build.yml | |
build-container: | |
uses: ./.github/workflows/build-container.yml | |
build-nuget-packages: | |
needs: [ build, build-container ] | |
uses: ./.github/workflows/build-nuget-packages.yml | |
test-build-managed: | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
test-tfm: [ net7.0, net6.0, net462 ] | |
machine: [ windows-2022, ubuntu-20.04, macos-11 ] | |
exclude: | |
- test-tfm: net462 | |
machine: macos-11 | |
- test-tfm: net462 | |
machine: ubuntu-20.04 | |
include: | |
- machine: windows-2022 | |
containers: none | |
- machine: ubuntu-20.04 | |
containers: linux | |
- machine: macos-11 | |
containers: none | |
runs-on: ${{ matrix.machine }} | |
steps: | |
- uses: actions/checkout@v3.5.3 | |
- uses: actions/setup-dotnet@v3.2.0 | |
with: | |
dotnet-version: | | |
6.0.411 | |
7.0.305 | |
- name: Check for NuGet packages cache | |
uses: actions/cache@v3.3.1 | |
id: nuget-cache | |
with: | |
key: ${{ hashFiles('**/Directory.packages.props', './build/LibraryVersions.g.cs', '**/packages.config' ) }} | |
path: ${{ env.NUGET_PACKAGES }} | |
- name: Download Artifacts from build job | |
uses: actions/download-artifact@v3.0.2 | |
with: | |
name: bin-${{ matrix.machine }} | |
path: bin/tracer-home | |
- name: Install SQL Server (localdb) | |
uses: potatoqualitee/mssqlsuite@v1.7 | |
if: ${{ runner.os == 'Windows' }} | |
with: | |
install: localdb | |
- run: ./build.cmd --skip NativeTests --target TestWorkflow --test-target-framework ${{ matrix.test-tfm }} --containers ${{ matrix.containers }} | |
- name: Upload test logs | |
uses: actions/upload-artifact@v3.1.2 | |
if: always() | |
with: | |
name: test-logs-${{ matrix.machine }}-${{ matrix.test-tfm }}-containers-${{ matrix.containers }} | |
path: test-artifacts/ | |
- name: Delete SQL Server MSI | |
if: ${{ runner.os == 'Windows' }} | |
shell: bash | |
run: | | |
rm SqlLocalDB.msi | |
test-build-native: | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
machine: [ windows-2022 ] | |
runs-on: ${{ matrix.machine }} | |
steps: | |
- uses: actions/checkout@v3.5.3 | |
- uses: actions/setup-dotnet@v3.2.0 | |
with: | |
dotnet-version: | | |
6.0.411 | |
7.0.305 | |
- name: Check for NuGet packages cache | |
uses: actions/cache@v3.3.1 | |
id: nuget-cache | |
with: | |
key: ${{ hashFiles('**/Directory.packages.props', './build/LibraryVersions.g.cs', '**/packages.config' ) }} | |
path: ${{ env.NUGET_PACKAGES }} | |
- name: Download Artifacts from build job | |
uses: actions/download-artifact@v3.0.2 | |
with: | |
name: bin-${{ matrix.machine }} | |
path: bin/tracer-home | |
- run: ./build.cmd NativeTests | |
test-build-windows-container-tests: | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- machine: windows-2022 | |
containers: windows-only | |
runs-on: ${{ matrix.machine }} | |
steps: | |
- uses: actions/checkout@v3.5.3 | |
- uses: actions/setup-dotnet@v3.2.0 | |
with: | |
dotnet-version: | | |
6.0.411 | |
7.0.305 | |
- name: Check for NuGet packages cache | |
uses: actions/cache@v3.3.1 | |
id: nuget-cache | |
with: | |
key: ${{ hashFiles('**/Directory.packages.props', './build/LibraryVersions.g.cs', '**/packages.config' ) }} | |
path: ${{ env.NUGET_PACKAGES }} | |
- name: Download Artifacts from build job | |
uses: actions/download-artifact@v3.0.2 | |
with: | |
name: bin-${{ matrix.machine }} | |
path: bin/tracer-home | |
- name: Build artifacts required for the test (no native tests) | |
run: ./build.cmd --skip RunManagedTests --target ManagedTests --containers ${{ matrix.containers }} | |
- name: Run the integration tests | |
run: ./build.cmd --target RunManagedIntegrationTests --containers ${{ matrix.containers }} | |
- name: Upload test logs | |
uses: actions/upload-artifact@v3.1.2 | |
if: always() | |
with: | |
name: test-logs-${{ matrix.machine }}-containers-${{ matrix.containers }} | |
path: test-artifacts/ | |
test-build-container: | |
needs: build-container | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- base-image: alpine | |
build-source: alpine | |
os-type: linux-musl | |
- base-image: centos | |
build-source: centos | |
os-type: linux-glibc | |
- base-image: debian | |
build-source: centos | |
os-type: linux-glibc | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v3.5.3 | |
- name: Download Artifacts from build job | |
uses: actions/download-artifact@v3.0.2 | |
with: | |
name: bin-${{ matrix.build-source }} | |
path: bin/tracer-home | |
- name: Build in Docker container | |
run: | | |
set -e | |
docker build -t mybuildimage -f "./docker/${{ matrix.base-image }}.dockerfile" ./docker | |
docker run -e OS_TYPE=${{ matrix.os-type }} --rm --mount type=bind,source="${GITHUB_WORKSPACE}",target=/project mybuildimage \ | |
./build.sh TestWorkflow --containers none | |
test-nuget-packages: | |
needs: build-nuget-packages | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- machine: ubuntu-20.04 | |
- machine: macos-11 | |
runs-on: ${{ matrix.machine }} | |
steps: | |
- uses: actions/checkout@v3.5.3 | |
- uses: actions/setup-dotnet@v3.2.0 | |
with: | |
dotnet-version: | | |
6.0.411 | |
7.0.305 | |
- name: Check for NuGet packages cache | |
uses: actions/cache@v3.3.1 | |
id: nuget-cache | |
with: | |
key: ${{ hashFiles('**/Directory.packages.props', './build/LibraryVersions.g.cs', '**/packages.config' ) }} | |
path: ${{ env.NUGET_PACKAGES }} | |
- name: Download NuGet Artifacts from build-nuget-packages job | |
uses: actions/download-artifact@v3.0.2 | |
with: | |
name: bin-nuget-packages | |
path: bin/nuget-artifacts/ | |
- name: Set NUKE_NUGET_VERSION_SUFFIX | |
id: set-nuget-version-suffix | |
run: echo "NUKE_NUGET_VERSION_SUFFIX=${{ needs.build-nuget-packages.outputs.nuget-version-suffix }}" >> "$GITHUB_ENV" | |
- name: Test NuGet Packages | |
run: ./build.cmd TestNuGetPackages |