Try to fix building of .net 9 (#6) #116
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: .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 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: Build and push 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 | |
- 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 |