6th maybe? #1446
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
# Credits to @Scighost from Starward for his contributions! | |
name: Build-Canary | |
#run-name: Canary Build for ${{ github.ref }} | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'main' | |
- 'nativeaot-test' | |
pull_request: | |
branches-ignore: | |
- 'stable' | |
- 'preview' | |
- 'translations_**' | |
# schedule: | |
# - cron: '0 0 * * 0' # At 00:00 on Sunday | |
jobs: | |
build: | |
# runs-on: [self-hosted, linux] | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
configuration: [Debug] # No need to distribute Debug builds | |
platform: [x64] | |
framework: [net9.0-windows10.0.22621.0] | |
env: | |
Configuration: ${{ matrix.configuration }} | |
Platform: ${{ matrix.platform }} | |
DOTNET_INSTALL_DIR: '.\.dotnet' | |
DOTNET_VERSION: '9.x' | |
DOTNET_QUALITY: 'ga' | |
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
dotnet-quality: ${{ env.DOTNET_QUALITY }} | |
cache: true | |
cache-dependency-path: CollapseLauncher/packages.lock.json | |
- name: Build | |
run: | | |
dotnet publish CollapseLauncher -c ${{matrix.Configuration}} -p:PublishProfile=Publish-DebugCIRelease -p:PublishDir=".\debug-build\" | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: collapse_${{ matrix.platform }}-${{ matrix.configuration }}_${{ matrix.framework }}_${{ github.sha }} | |
path: ./CollapseLauncher/debug-build/ | |
compression-level: 9 | |
build-nativeaot: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
configuration: [Debug] | |
platform: [x64] | |
framework: [net9.0-windows10.0.22621.0] | |
env: | |
Configuration: ${{ matrix.configuration }} | |
Platform: ${{ matrix.platform }} | |
DOTNET_INSTALL_DIR: '.\.dotnet' | |
DOTNET_VERSION: '9.x' | |
DOTNET_QUALITY: 'signed' | |
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# - name: Install .NET | |
# uses: actions/setup-dotnet@v4 | |
# with: | |
# dotnet-version: ${{ env.DOTNET_VERSION }} | |
# dotnet-quality: ${{ env.DOTNET_QUALITY }} | |
# cache: true | |
# cache-dependency-path: CollapseLauncher/packages.lock.json | |
- name: Manual .NET install | |
run: | | |
Import-Module "$env:ChocolateyInstall/helpers/chocolateyInstaller.psm1" | |
Invoke-WebRequest 'https://download.visualstudio.microsoft.com/download/pr/7c9b3974-1350-4fc0-9e71-26ef66400270/4f8ba90528060880240f392408e50053/dotnet-sdk-9.0.200-preview.0.24575.35-win-x64.exe' -OutFile 'dotnet-9.0.200-pre.exe' | |
./dotnet-9.0.200-pre.exe /install /quiet /norestart | |
refreshenv | |
dotnet --version | |
dotnet --list-sdks | |
# - name: Restore | |
# run: dotnet restore CollapseLauncher --locked-mode | |
# Don't need to do restore explicitly, should be done on Build time | |
- name: Build | |
run: | | |
dotnet publish CollapseLauncher -c ${{matrix.Configuration}} -p:PublishProfile=Publish-DebugCIReleaseAOT -p:PublishDir=".\debug-aot-build\" | |
- name: Upload debug symbols | |
uses: actions/upload-artifact@v4 | |
with: | |
name: aot-experimental-symbols_collapse_${{ matrix.platform }}-${{ matrix.configuration }}_${{ matrix.framework }}_${{ github.sha }} | |
path: ./CollapseLauncher/debug-aot-build/**/*.pdb | |
compression-level: 9 | |
- name: Remove debug symbols | |
run: | | |
Remove-Item -Path "./CollapseLauncher/debug-aot-build/*.pdb" -Recurse -Force | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: aot-experimental_collapse_${{ matrix.platform }}-${{ matrix.configuration }}_${{ matrix.framework }}_${{ github.sha }} | |
path: ./CollapseLauncher/debug-aot-build/ | |
compression-level: 9 | |
notify-discord: | |
runs-on: ubuntu-latest | |
if: always() | |
needs: [build, build-nativeaot] | |
steps: | |
- name: Notify Discord | |
uses: sarisia/[email protected] | |
if: always() | |
continue-on-error: true | |
with: | |
webhook: ${{ secrets.DISCORD_WEBHOOK_NIGHTLY }} | |
title: Collapse Launcher CI build is complete! | |
status: ${{ job.status }} | |
description: | | |
Commit `${{ github.sha }}` by ${{ github.actor }} | |
Click [here](https://nightly.link/CollapseLauncher/Collapse/actions/runs/${{ github.run_id }}) to download! |