Skip to content
Merged
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
49 changes: 28 additions & 21 deletions .github/workflows/csharp-app-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ on:
required: false
type: string
default: "src"
configuration:
description: 'Configuration'
configurations:
description: 'Configurations'
required: false
type: string
default: "Release"
platform:
description: 'Platform'
default: '["Release"]'
platforms:
description: 'Platforms'
required: false
type: string
default: "x64"
default: '["x64"]'
binary_path:
description: 'Path to the binaries.'
required: false
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
docs-present: ${{ steps.docs.outputs.present }}
changelog: ${{ steps.changelog.outputs.changelog }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
token: ${{ env.GITHUB_TOKEN }}

Expand All @@ -87,7 +87,7 @@ jobs:
shell: sh

- name: Cache licence-check
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: /lc
key: lcc
Expand Down Expand Up @@ -160,14 +160,18 @@ jobs:
deploy:
needs: release-checks
runs-on: windows-2025
strategy:
matrix:
platform: ${{ fromJson(inputs.platforms) }}
configuration: ${{ fromJson(inputs.configurations) }}
steps:
- name: Work around git permission issue
run: |
dname=$(echo ${{github.repository}} | cut -d'/' -f2)
git config --global --add safe.directory /__w/$dname/$dname
shell: sh

- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Checkout release branch
run: |
Expand All @@ -177,10 +181,10 @@ jobs:
shell: bash

- name: Setup NuGet
uses: NuGet/setup-nuget@v1.0.5
uses: NuGet/setup-nuget@v4

- name: Setup MSBuild Path
uses: microsoft/setup-msbuild@v1
uses: microsoft/setup-msbuild@v3

- name: Setup VSTest Path
uses: darenm/Setup-VSTest@v1.1.1
Expand All @@ -190,20 +194,21 @@ jobs:

- name: Restore NuGet Packages
run:
msbuild /p:Configuration=${{ inputs.configuration }} /p:Platform=${{ inputs.platform }} /t:restore
msbuild /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /t:restore

- name: Build
id: build
run: msbuild /p:Configuration=${{ inputs.configuration }} /p:Platform=${{ inputs.platform }}
run: msbuild /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}

- name: Test
run: vstest.console.exe ${{ inputs.test_files }} /Platform:${{ inputs.platform }}
if: ${{ inputs.test_files != "" }}
run: vstest.console.exe ${{ inputs.test_files }} /Platform:${{ matrix.platform }}

- name: Set upload path
id: upload_path
run: |
if [[ -z $BINARY_PATH ]]; then
echo "path=${{ needs.release-checks.outputs.artifact_id }}/bin/Release/" >> $GITHUB_OUTPUT
echo "path=${{ needs.release-checks.outputs.artifact_id }}/bin/${{ matrix.platform }}/${{ matrix.configuration }}" >> $GITHUB_OUTPUT
else
echo "path=$BINARY_PATH" >> $GITHUB_OUTPUT
fi
Expand All @@ -213,9 +218,9 @@ jobs:

- name: Upload Release
id: upload
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: ${{ needs.release-checks.outputs.artifact_id }}
name: ${{ needs.release-checks.outputs.artifact_id }}-${{ needs.release-checks.outputs.version }}-${{ matrix.platform }}
path: ${{ steps.upload_path.outputs.path }}
if-no-files-found: error

Expand Down Expand Up @@ -245,7 +250,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
token: ${{ env.GITHUB_TOKEN }}

Expand Down Expand Up @@ -278,12 +283,14 @@ jobs:
shell: bash

- name: Download binary
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: ${{ needs.release-checks.outputs.artifact_id }}
path: built-artifacts
continue-on-error: true

- name: Clean documents from the released binaries
run: rm -rf built-artifacts/*docs*.zip

- name: Archive Release
uses: thedoctor0/zip-release@master
with:
Expand Down Expand Up @@ -331,7 +338,7 @@ jobs:
SLACK_NOTIFICATION: YES
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
token: ${{ env.GITHUB_TOKEN }}

Expand Down
46 changes: 25 additions & 21 deletions .github/workflows/csharp-app-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ on:
required: false
default: "productreponotprovided"
type: string
configuration:
description: 'Configuration'
configurations:
description: 'Configurations'
required: false
type: string
default: "Release"
platform:
description: 'Platform'
default: '["Release"]'
platforms:
description: 'Platforms'
required: false
type: string
default: "x64"
default: '["x64"]'
binary_path:
description: 'Path to the binaries.'
required: false
Expand All @@ -63,15 +63,15 @@ on:
value: ${{ jobs.build.outputs.version }}

jobs:
checks:
release-checks:
runs-on: ubuntu-latest
container: zepben/pipeline-basic
outputs:
docs-present: ${{ steps.docs.outputs.present }}
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
token: ${{ env.GITHUB_TOKEN }}

Expand All @@ -82,7 +82,7 @@ jobs:
shell: sh

- name: Cache licence-check
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: /lc
key: lcc
Expand Down Expand Up @@ -132,9 +132,13 @@ jobs:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
outputs:
version: ${{ steps.update-info-version.outputs.info_version }}
strategy:
matrix:
platform: ${{ fromJson(inputs.platforms) }}
configuration: ${{ fromJson(inputs.configurations) }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Work around git permission issue
run: |
Expand All @@ -143,10 +147,10 @@ jobs:
shell: sh

- name: Setup NuGet
uses: NuGet/setup-nuget@v1.0.5
uses: NuGet/setup-nuget@v4

- name: Setup MSBuild Path
uses: microsoft/setup-msbuild@v1
uses: microsoft/setup-msbuild@v3

- name: Setup VSTest Path
uses: darenm/Setup-VSTest@v1.1.1
Expand All @@ -169,20 +173,20 @@ jobs:

- name: Restore NuGet Packages
run:
msbuild /p:Configuration=${{ inputs.configuration }} /p:Platform=${{ inputs.platform }} /t:restore
msbuild /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /t:restore

- name: Build
run: msbuild /p:Configuration=${{ inputs.configuration }} /p:Platform=${{ inputs.platform }}
run: msbuild /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}

- name: Test
if: ${{ inputs.test_files != '' }}
run: vstest.console.exe ${{ inputs.test_files }} /Platform:${{ inputs.platform }}
run: vstest.console.exe ${{ inputs.test_files }} /Platform:${{ matrix.platform }}

- name: Set upload path
id: upload_path
run: |
if [[ -z $BINARY_PATH ]]; then
echo "path=${{ needs.release-checks.outputs.artifact_id }}/bin/Release/" >> $GITHUB_OUTPUT
echo "path=${{ env.artifact_id }}/bin/${{ matrix.platform }}/${{ matrix.configuration }}" >> $GITHUB_OUTPUT
else
echo "path=$BINARY_PATH" >> $GITHUB_OUTPUT
fi
Expand All @@ -192,14 +196,14 @@ jobs:

- name: Upload Release
id: upload
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: ${{ env.artifact_id }}-${{ env.info_version }}
path: ${{ env.artifact_id }}/bin/Release/
name: ${{ env.artifact_id }}-${{ env.info_version }}-${{ matrix.platform }}
path: ${{ steps.upload_path.outputs.path }}

build-docs:
needs: [build]
if: ${{ needs.build-app.outputs.docs-present == 'yes' }}
needs: [release-checks, build]
if: ${{ needs.release-checks.outputs.docs-present == 'yes' }}
uses: ./.github/workflows/build-docs.yml
with:
DEPLOY: true
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/csharp-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ on:
required: false
type: string
default: "src"
configuration:
description: 'Configuration'
configurations:
description: 'Configurations'
required: false
type: string
default: "Release"
platform:
description: 'Platform'
default: '["Release"]'
platforms:
description: 'Platforms'
required: false
type: string
default: "x64"
default: '["x64"]'
secrets:
CI_GITHUB_TOKEN:
required: true
Expand Down Expand Up @@ -146,6 +146,10 @@ jobs:
build-and-test:
needs: checks
runs-on: windows-2025
strategy:
matrix:
platform: ${{ fromJson(inputs.platforms) }}
configuration: ${{ fromJson(inputs.configurations) }}
env:
DEBUG: ${{ secrets.DEBUG }}
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
Expand Down Expand Up @@ -175,14 +179,14 @@ jobs:

- name: Restore NuGet Packages
run:
msbuild /p:Configuration=${{ inputs.configuration }} /p:Platform=${{ inputs.platform }} /t:restore
msbuild /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /t:restore

- name: Build
run: msbuild /p:Configuration=${{ inputs.configuration }} /p:Platform=${{ inputs.platform }}
run: msbuild /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}

- name: Test
if: ${{ inputs.test_files != '' }}
run: vstest.console.exe ${{ inputs.test_files }} /Platform:${{ inputs.platform }}
run: vstest.console.exe ${{ inputs.test_files }} /Platform:${{ matrix.platform }}

build-docs:
needs: [checks]
Expand Down