Skip to content

Limit MacOS to 13 for x86 machines #224

Limit MacOS to 13 for x86 machines

Limit MacOS to 13 for x86 machines #224

# WARNING: This file is automatically generated by ../regenerate-actions.sh
name: CD
on:
push:
branches:
- master
- support/*
paths-ignore:
- docs/**
- README.md
- .editorconfig
- .gitattributes
- .gitignore
- .github/ISSUE_TEMPLATE/**
- .github/pull_request_template.md
defaults:
run:
shell: bash
jobs:
build:
name: Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
5.0.x
6.x
7.x
8.x
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Debug --logger GitHubActions -p:CollectCoverage=true
-p:CoverletOutputFormat=cobertura
- name: Pack
run: dotnet pack -p:PackageOutputPath="$(pwd)/artifacts" --configuration Release
--no-restore
- name: Publish Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./tests/UnitTests/coverage.cobertura.xml
- name: Upload Artifacts
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: artifacts
path: |
artifacts/*
build-standalone-binaries:
name: Build Standalone Binaries
needs: build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- rid: win-x64
os: windows-latest
exe: verlite.exe
- rid: linux-x64
os: ubuntu-latest
exe: verlite
- rid: osx-x64
os: macos-13
exe: verlite
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
5.0.x
6.x
7.x
8.x
- name: Publish
run: |
dotnet publish -r "${rid}" -c Release src/Verlite.CLI/Verlite.CLI.csproj -p:VerliteAot=true -o build
mkdir -p artifacts
cp "build/${exe}" "artifacts/${exe}"
cd artifacts/
./${exe} --version
tar -zcvf "verlite-${rid}.tar.gz" "${exe}"
rm "${exe}"
env:
rid: ${{ matrix.rid }}
exe: ${{ matrix.exe }}
- name: Upload Artifacts
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: artifacts
path: |
artifacts/*
mutation-tests:
name: Mutation Test
needs: build
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
5.0.x
6.x
7.x
8.x
- name: Mutation Test
run: |
dotnet tool install --global dotnet-stryker --version 3.2.0
cd tests/UnitTests
if [[ "$GITHUB_REF" == "refs/heads/master" ]]; then
dotnet stryker --reporter html --reporter dashboard --reporter progress --version master # --log-to-file
else
dotnet stryker --reporter html --reporter progress # --log-to-file
fi
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
- name: Archive mutation output
if: success() || failure()
run: |
cd tests/UnitTests
mkdir -p ../../artifacts
find StrykerOutput -name mutation-report.html -exec cp {} ../../artifacts/ \;
if [[ -d StrykerOutput ]]; then
mv StrykerOutput ../../artifacts/StrykerOutput
fi
- name: Upload Artifacts
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: artifacts
path: |
artifacts/*
integration-tests:
name: Integration Tests
needs: build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
5.0.x
6.x
7.x
8.x
- name: Run Integration Tests
run: |
chmod +x ./tests/IntegrationTests/run.sh
./tests/IntegrationTests/run.sh
publish:
name: Publish
needs:
- build
- build-standalone-binaries
- integration-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
5.0.x
6.x
7.x
8.x
- name: Setup NuGet
run: |
dotnet nuget update source github --store-password-in-clear-text --username AshleighAdams --password ${{ secrets.PERSONAL_ACCESS_TOKEN }}
dotnet nuget enable source github
- name: Download Artifacts
uses: actions/download-artifact@v2
- name: Publish Nuget GitHub
run: dotnet nuget push 'artifacts/*.nupkg' -k ${GITHUB_TOKEN} -s github --skip-duplicate
--no-symbols
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}