Skip to content

Upgrade to .NET 9

Upgrade to .NET 9 #113

Workflow file for this run

name: .NET
on:
push:
branches: [ main ]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
publish:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: test
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Delete huge unnecessary tools folder
run: rm -rf /opt/hostedtoolcache
- uses: actions/checkout@v4
with:
submodules: true
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push bot
uses: docker/bake-action@v5
with:
source: .
workdir: Bot
push: true
set: |
*.platform=linux/amd64,linux/arm64
*.cache-from=type=gha
*.cache-to=type=gha,mode=min
- name: Check if checked jit might have changed
uses: dorny/paths-filter@v3
id: checked-jit
with:
filters: |
checked-jit:
- 'Backend/Sandbox/CheckedJit/**'
- '.github/workflows/**'
- name: Set MINUS_PREFIXED_PLATFORM_IF_NOT_AMD64
if: steps.checked-jit.outputs.checked-jit == 'true'
run: |
MINUS_PREFIXED_PLATFORM_IF_NOT_AMD64=${{ runner.arch != 'X64' && format('-{0}', runner.arch) || '' }}
echo "MINUS_PREFIXED_PLATFORM_IF_NOT_AMD64=${MINUS_PREFIXED_PLATFORM_IF_NOT_AMD64,,}" >>${GITHUB_ENV}
- name: Build and push runtime with checked jit
if: steps.checked-jit.outputs.checked-jit == 'true'
uses: docker/bake-action@v5
with:
source: .
workdir: Backend/Sandbox/CheckedJit
push: true
set: |
*.platform=linux/amd64,linux/arm64
*.cache-from=type=gha
*.cache-to=type=gha,mode=min
checked-jit.args.MINUS_PREFIXED_PLATFORM_IF_NOT_AMD64=${{ env.MINUS_PREFIXED_PLATFORM_IF_NOT_AMD64 }}
- name: Build and push backend
uses: docker/bake-action@v5
with:
source: .
workdir: Backend
push: true
set: |
*.platform=linux/amd64,linux/arm64
*.cache-from=type=gha
*.cache-to=type=gha,mode=min