Insecure mode for https forwarding #196
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: Main and Release CI Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master, main ] | |
create: | |
tags: | |
- 'v*.*' | |
pull_request: | |
branches: [ master, main ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
include: | |
- os: windows-latest | |
windows: true | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Mandatory to use the extract version from tag action | |
- name: Extract version from tag | |
uses: damienaicheh/[email protected] | |
- name: Export version | |
run: | | |
echo "VERSIONSUFFIX=${{ env.PRE_RELEASE }}" >> $GITHUB_ENV | |
echo "PRODVERSION=${{ env.MAJOR }}.${{ env.MINOR }}" >> $GITHUB_ENV | |
echo "PATCHVERSION=${{ env.PATCH }}" >> $GITHUB_ENV | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build Docker Image TAR file | |
run: | | |
mkdir -p artifacts/build/images | |
DOCKER_BUILDKIT=1 docker build . --build-arg "REVISION=${{ env.PRODVERSION }}.${{ env.PATCHVERSION }}" --build-arg "VERSION=${{ env.PRODVERSION }}" -t azbridge:${{ env.PRODVERSION }} -t azbridge | |
docker save azbridge:${{ env.PRODVERSION }} > artifacts/build/images/azbridge-oci-image-${{ env.PRODVERSION }}.${{ env.PATCHVERSION }}.tar | |
if: matrix.os == 'ubuntu-latest' | |
- name: Build for Windows 10-x64 | |
run: dotnet msbuild /t:Package /p:WindowsOnly=true /p:RuntimeIdentifier=win10-x64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel | |
if: matrix.os == 'windows-latest' | |
- name: Build for Windows 10-arm64 | |
run: dotnet msbuild /t:Restore,Package /p:WindowsOnly=false /p:RuntimeIdentifier=win10-arm /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel | |
if: matrix.os == 'windows-latest' | |
- name: Build for Windows 10-x86 | |
run: dotnet msbuild /t:Restore,Package /p:WindowsOnly=false /p:RuntimeIdentifier=win10-x86 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel | |
if: matrix.os == 'windows-latest' | |
- name: Build for macOS-x64 | |
run: dotnet msbuild /t:Package /p:WindowsOnly=false /p:RuntimeIdentifier=osx-x64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel | |
if: matrix.os == 'ubuntu-latest' | |
- name: Build for Ubuntu 18-x64 | |
run: dotnet msbuild /t:Package /p:WindowsOnly=false /p:RuntimeIdentifier=ubuntu.18.04-x64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel | |
if: matrix.os == 'ubuntu-latest' | |
- name: Build for Ubuntu 18-arm64 | |
run: dotnet msbuild /t:Restore,Package /p:WindowsOnly=false /p:RuntimeIdentifier=ubuntu.18.04-arm64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel | |
if: matrix.os == 'ubuntu-latest' | |
- name: Build for Ubuntu 20-x64 | |
run: dotnet msbuild /t:Package /p:WindowsOnly=false /p:RuntimeIdentifier=ubuntu.20.04-x64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel | |
if: matrix.os == 'ubuntu-latest' | |
- name: Build for Ubuntu 20-arm64 | |
run: dotnet msbuild /t:Restore,Package /p:WindowsOnly=false /p:RuntimeIdentifier=ubuntu.20.04-arm64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel | |
if: matrix.os == 'ubuntu-latest' | |
- name: Build for Debian 10-x64 | |
run: dotnet msbuild /t:Package /p:WindowsOnly=false /p:RuntimeIdentifier=debian.10-x64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel | |
if: matrix.os == 'ubuntu-latest' | |
- name: Build for OpenSUSE 15-x64 | |
run: dotnet msbuild /t:Restore,Package /p:WindowsOnly=false /p:RuntimeIdentifier=opensuse.15.0-x64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel | |
if: matrix.os == 'ubuntu-latest' | |
- name: Build for Fedora 30-x64 | |
run: dotnet msbuild /t:Restore,Package /p:WindowsOnly=false /p:RuntimeIdentifier=fedora.34-x64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel | |
if: matrix.os == 'ubuntu-latest' | |
- name: Build for CentOS 9-x64 | |
run: dotnet msbuild /t:Restore,Package /p:WindowsOnly=false /p:RuntimeIdentifier=centos.9-x64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel | |
if: matrix.os == 'ubuntu-latest' | |
- name: Unit Test Windows x64 | |
env: | |
AZBRIDGE_TEST_CXNSTRING: ${{ secrets.AZBRIDGE_TEST_CXNSTRING }} | |
run: dotnet test /p:TargetFramework=net6.0 /p:RuntimeIdentifier=win10-x64 /p:Configuration=Debug | |
if: matrix.os == 'windows-latest' | |
- name: Unit Test Ubuntu 20.04 | |
env: | |
AZBRIDGE_TEST_CXNSTRING: ${{ secrets.AZBRIDGE_TEST_CXNSTRING }} | |
run: dotnet test /p:TargetFramework=net6.0 /p:RuntimeIdentifier=ubuntu.20.04-x64 /p:Configuration=Debug | |
if: matrix.os == 'ubuntu-latest' | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: XBuild | |
path: artifacts/build/net6.0 | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: XBuild | |
path: artifacts/build/images | |
if: matrix.os == 'ubuntu-latest' | |
- name: Integration Tests Docker/Linux | |
env: | |
AZBRIDGE_TEST_CXNSTRING: ${{ secrets.AZBRIDGE_TEST_CXNSTRING }} | |
run: bash ./verify-build.sh | |
if: matrix.os == 'ubuntu-latest' | |
- name: Integration Tests Windows | |
env: | |
AZBRIDGE_TEST_CXNSTRING: ${{ secrets.AZBRIDGE_TEST_CXNSTRING }} | |
run: ./verify-build.cmd | |
if: matrix.os == 'windows-latest' | |
# create a release if a tag has been pushed | |
- name: Generate Release | |
uses: ncipollo/release-action@v1 | |
if: startsWith(github.ref, 'refs/tags/v') | |
with: | |
artifacts: "artifacts/build/net6.0/*,artifacts/build/images/*" | |
generateReleaseNotes: true | |
allowUpdates: true | |