Skip to content

Merge pull request #3 from wieslawsoltes/feature/pretext-native-backends #23

Merge pull request #3 from wieslawsoltes/feature/pretext-native-backends

Merge pull request #3 from wieslawsoltes/feature/pretext-native-backends #23

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
DOTNET_VERSION: '10.0.x'
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
build-test:
name: Build & Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore core library
run: dotnet restore src/Pretext/Pretext.csproj
- name: Build core library
run: dotnet build src/Pretext/Pretext.csproj -c Release --no-restore
- name: Restore tests
run: dotnet restore tests/Pretext.Uno.Tests/Pretext.Uno.Tests.csproj
- name: Build tests
run: dotnet build tests/Pretext.Uno.Tests/Pretext.Uno.Tests.csproj -c Release --no-restore
- name: Test
run: dotnet test tests/Pretext.Uno.Tests/Pretext.Uno.Tests.csproj -c Release --no-build --logger "trx;LogFileName=pretext-tests.trx" --results-directory ./artifacts/test-results
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.os }}
path: artifacts/test-results/
if-no-files-found: ignore
retention-days: 7
docs-build:
name: Docs Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Restore local tools
run: dotnet tool restore
- name: Build docs
run: |
chmod +x build-docs.sh
./build-docs.sh
- name: Upload docs preview
uses: actions/upload-artifact@v4
with:
name: docs-preview
path: site/.lunet/build/www/
if-no-files-found: error
retention-days: 7
pack-preview:
name: Pack Preview
runs-on: ubuntu-latest
needs: [build-test, docs-build]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore
run: |
dotnet restore src/Pretext/Pretext.csproj
dotnet restore src/Pretext.Uno/Pretext.Uno.csproj
- name: Pack Pretext
run: dotnet pack src/Pretext/Pretext.csproj -c Release --no-restore -o ./artifacts/packages /p:VersionSuffix=ci.${{ github.run_number }}
- name: Pack Pretext.Uno
run: dotnet pack src/Pretext.Uno/Pretext.Uno.csproj -c Release --no-restore -o ./artifacts/packages /p:VersionSuffix=ci.${{ github.run_number }}
- name: Upload preview packages
uses: actions/upload-artifact@v4
with:
name: nuget-preview-packages
path: artifacts/packages/
if-no-files-found: error
retention-days: 7