Skip to content

Refactor CI workflow #1925

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 44 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on: [push, pull_request]

jobs:
build:

runs-on: ${{ matrix.os }}

strategy:
Expand All @@ -13,12 +12,15 @@ jobs:
os: [windows-latest, ubuntu-22.04, macos-latest]

steps:
# Prerequisites
- name: Install tools
if: matrix.os == 'ubuntu-22.04'
run: sudo apt-get -yq install mono-vbnc dos2unix
- uses: actions/checkout@v4
with:
submodules: true

# Setup .NET
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v4
with:
Expand All @@ -31,26 +33,59 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'

# CI debug information
- name: Version Information
run: |
dotnet --info
try { msbuild -version } catch { }
try { mono --version } catch { }
shell: pwsh

# Build & package
- name: Build
run: pwsh make.ps1
- name: Package
run: pwsh make.ps1 package

# Upload package
- uses: actions/upload-artifact@v4
with:
name: packages-${{ matrix.os }}
path: Package/Release/Packages
- name: Test (net462)
run: ./make.ps1 -frameworks net462 test-all
shell: pwsh
- name: Test (net6.0)
run: ./make.ps1 -frameworks net6.0 test-all
shell: pwsh
- name: Test (net8.0)
run: ./make.ps1 -frameworks net8.0 test-all

test:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-22.04, macos-latest]
framework: ['net462', 'net6.0', 'net8.0']

steps:
# Prerequisites
- uses: actions/checkout@v4
with:
submodules: true

# Setup .NET
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Setup .NET 9.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'

# Build & Test
- name: Build
run: pwsh make.ps1
- name: Test (${{ matrix.framework }})
run: ./make.ps1 -frameworks ${{ matrix.framework }} test-all
shell: pwsh