Skip to content

Migrate workflow to GitHub Actions #1105

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
68 changes: 68 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CI-build

# This workflow should trigger in the following cases:
# - The commit is any push in any branch in the repo
# - The commit is a published PR from anyone else
#
# This setup is done to avoid duplicate runs for the same exact commits, for cases when
# the PR is done from a branch in this repo, which would already trigger the "push"
# condition. This way, only PRs from forks will actually trigger the workflow.
#
# Because we can't really check these conditions from the global triggers here, they are
# added to the two root jobs below instead. If canceled, the whole workflow will stop.
on: [push, pull_request]

jobs:
build-and-test:
if: >-
github.event_name == 'push' ||
github.event.pull_request.user.login != github.repository_owner
strategy:
matrix:
configuration: [Debug, Release]
runs-on: windows-2022
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Install .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json

# Build the whole solution
- name: Build solution
run: dotnet build -c ${{matrix.configuration}} /bl
- name: Upload MSBuild binary log
uses: actions/upload-artifact@v4
with:
name: msbuild_log_${{matrix.configuration}}
path: msbuild.binlog
if-no-files-found: error

# Run tests
- name: Test solution
run: dotnet test --no--build -c ${{matrix.configuration}} -l "trx;LogFileName=VSTestResults.trx"

# Publish test results
- name: Publish test results
uses: actions/upload-artifact@v4
with:
name: '**/TestResults/VSTestResults.trx'
path: VSTestResults
if-no-files-found: error

# Pack solution
- name: Pack solution
run: dotnet pack --no-build -c ${{matrix.configuration}}

# Sign packages
- name: Sign packages
run: echo "TODO"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Arlodotexe can you help me finish this part with whatever the Windows Community Toolkit is doing?


# Publish build artifacts
- name: Publish package artifacts
uses: actions/upload-artifact@v4
with:
name: 'bin/nupkg/*.nupkg'
path: Packages
if-no-files-found: error
73 changes: 0 additions & 73 deletions azure-pipelines.yml

This file was deleted.

2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "9.0.100",
"version": "9.0.301",
"rollForward": "latestFeature",
"allowPrerelease": false
}
Expand Down