Skip to content

Commit 8dc2b44

Browse files
committed
(build) Overhaul build files
Make them match what is in play on Cake.AppVeyor
1 parent 15609f9 commit 8dc2b44

File tree

5 files changed

+106
-57
lines changed

5 files changed

+106
-57
lines changed

.config/dotnet-tools.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"version": "3.2.0",
77
"commands": [
88
"dotnet-cake"
9-
]
9+
],
10+
"rollForward": false
1011
}
1112
}
1213
}

.github/workflows/build.yml

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,14 @@ on:
99
jobs:
1010
build:
1111
runs-on: ${{ matrix.os }}
12-
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
1312
strategy:
1413
matrix:
15-
os: [ windows-2025 ]
14+
os: [ windows-2025, ubuntu-24.04 ]
1615

1716
env:
1817
AZURE_PASSWORD: ${{ secrets.AZURE_PASSWORD }}
1918
AZURE_SOURCE: ${{ secrets.AZURE_SOURCE }}
2019
AZURE_USER: ${{ secrets.AZURE_USER }}
21-
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN }}
2220
GITHUB_PAT: ${{ secrets.GH_TOKEN }}
2321
GITTER_ROOM_ID: ${{ secrets.GITTER_ROOM_ID }}
2422
GPR_PASSWORD: ${{ secrets.GPR_PASSWORD }}
@@ -34,51 +32,60 @@ jobs:
3432
WYAM_ACCESS_TOKEN: ${{ secrets.WYAM_ACCESS_TOKEN }}
3533
WYAM_DEPLOY_BRANCH: "gh-pages"
3634
WYAM_DEPLOY_REMOTE: ${{ github.event.repository.html_url }}
35+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
3736
steps:
38-
- name: Get the sources
39-
uses: actions/checkout@v5.0.0
37+
- name: Checkout the repository
38+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
4039
with:
4140
fetch-depth: 0
4241

43-
- name: Cache Tools
44-
uses: actions/[email protected]
45-
with:
46-
path: tools
47-
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
48-
49-
- name: Install .NET SDK 5.0.x - 10.0.x
50-
uses: actions/[email protected]
42+
- name: Install dotnet
43+
uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5
5144
with:
5245
dotnet-version: |
53-
5.0.x
5446
6.0.x
5547
7.0.x
5648
8.0.x
5749
9.0.x
5850
10.0.x
5951
60-
- name: Install .NET Core SDK (global.json)
61-
uses: actions/[email protected]
52+
- name: Install mono
53+
if: runner.os == 'Linux'
54+
# check https://www.mono-project.com/download/stable/#download-lin
55+
run: |
56+
sudo apt install ca-certificates gnupg
57+
sudo gpg --homedir /tmp --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
58+
sudo chmod +r /usr/share/keyrings/mono-official-archive-keyring.gpg
59+
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
60+
sudo apt update
61+
sudo apt install -y mono-complete
62+
mono --version
63+
64+
- name: Cache Tools
65+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
66+
with:
67+
path: tools
68+
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
6269

6370
- name: Build project
64-
uses: cake-build/cake-action@v3.0.1
71+
uses: cake-build/cake-action@d218f1133bb74a1df0b08c89cfd8fc100c09e1a0 # v3
6572
with:
6673
script-path: recipe.cake
6774
target: CI
6875
verbosity: Normal
69-
cake-version: 1.3.0
70-
cake-bootstrap: true
76+
cake-version: tool-manifest
7177

7278
- name: Upload Issues-Report
73-
uses: actions/upload-artifact@v4.6.2
79+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
7480
with:
7581
if-no-files-found: warn
76-
name: issues-${{ matrix.os }}
82+
name: ${{ matrix.os }} issues
7783
path: BuildArtifacts/report.html
7884

7985
- name: Upload Packages
80-
uses: actions/[email protected]
86+
if: runner.os == 'Windows'
87+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
8188
with:
8289
if-no-files-found: warn
83-
name: package-${{ matrix.os }}
84-
path: BuildArtifacts/Packages/**/*
90+
name: package
91+
path: BuildArtifacts/Packages/**/*

.github/workflows/codeql-analysis.yml

Lines changed: 47 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ on:
1313
branches: [develop]
1414
schedule:
1515
- cron: '0 15 * * 6'
16+
workflow_dispatch:
1617

1718
jobs:
1819
analyze:
1920
name: Analyze
20-
runs-on: ubuntu-latest
21+
runs-on: ubuntu-24.04
2122

2223
strategy:
2324
fail-fast: false
@@ -30,40 +31,70 @@ jobs:
3031

3132
steps:
3233
- name: Checkout repository
33-
uses: actions/checkout@v5.0.0
34+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
3435
with:
3536
fetch-depth: 0
3637

37-
- name: Install .NET SDK 5.0.x - 9.0.x
38-
uses: actions/setup-dotnet@v4.3.1
38+
- name: Install dotnet
39+
uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5
3940
with:
41+
# codecov needs 2.1
42+
# unittests needs 3.1
43+
# gitversion needs 5.0
4044
dotnet-version: |
45+
2.1.x
46+
3.1.x
4147
5.0.x
4248
6.0.x
4349
7.0.x
4450
8.0.x
45-
9.0.x
4651
47-
# If this run was triggered by a pull request event, then checkout
48-
# the head of the pull request instead of the merge commit.
49-
- run: git checkout HEAD^2
50-
if: ${{ github.event_name == 'pull_request' }}
52+
- name: Cache Tools
53+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
54+
with:
55+
path: tools
56+
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
5157

52-
- name: Install .NET Core SDK (global.json)
53-
uses: actions/[email protected]
58+
- name: Install mono
59+
if: runner.os == 'Linux'
60+
# check https://www.mono-project.com/download/stable/#download-lin
61+
run: |
62+
sudo apt install ca-certificates gnupg
63+
sudo gpg --homedir /tmp --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
64+
sudo chmod +r /usr/share/keyrings/mono-official-archive-keyring.gpg
65+
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
66+
sudo apt update
67+
sudo apt install -y mono-complete
68+
mono --version
5469
55-
# Initializes the CodeQL tools for scanning.
70+
# Initializes the CodeQL tools for scanning.
5671
- name: Initialize CodeQL
57-
uses: github/codeql-action/init@v3
72+
uses: github/codeql-action/init@cf1bb45a277cb3c205638b2cd5c984db1c46a412 # v4
5873
with:
5974
languages: ${{ matrix.language }}
6075
# If you wish to specify custom queries, you can do so here or in a config file.
6176
# By default, queries listed here will override any specified in a config file.
6277
# Prefix the list here with "+" to use these queries and those in the config file.
6378
# queries: ./path/to/local/query, your-org/your-repo/queries@main
6479

65-
- run: ./build.ps1
66-
shell: pwsh
80+
- name: Build project
81+
uses: cake-build/cake-action@d218f1133bb74a1df0b08c89cfd8fc100c09e1a0 # v3
82+
with:
83+
script-path: recipe.cake
84+
target: DotNet-Build
85+
cake-version: tool-manifest
86+
env:
87+
COMPlus_DbgEnableMiniDump: 1
88+
COMPlus_DbgMiniDumpType: 1
89+
COMPlus_DbgMiniDumpName: BuildArtifacts/coredump.dmp
6790

6891
- name: Perform CodeQL Analysis
69-
uses: github/codeql-action/analyze@v3
92+
uses: github/codeql-action/analyze@cf1bb45a277cb3c205638b2cd5c984db1c46a412 # v4
93+
94+
- name: Upload CoreDump
95+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
96+
if: failure()
97+
with:
98+
if-no-files-found: warn
99+
name: CoreDump
100+
path: BuildArtifacts/coredump.dmp

.github/workflows/publishDocs.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,33 @@ jobs:
1515

1616
steps:
1717
- name: checkout
18-
uses: actions/checkout@v5.0.0 #https://github.com/actions/checkout
18+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 #https://github.com/actions/checkout
1919
with:
2020
fetch-depth: 0 # GitVersion is somewhat irritated when fetch-depth is "1"....
2121
ref: ${{ github.event.ref }}
22-
22+
23+
- name: Install mono
24+
if: runner.os == 'Linux'
25+
# check https://www.mono-project.com/download/stable/#download-lin
26+
run: |
27+
sudo apt install ca-certificates gnupg
28+
sudo gpg --homedir /tmp --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
29+
sudo chmod +r /usr/share/keyrings/mono-official-archive-keyring.gpg
30+
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
31+
sudo apt update
32+
sudo apt install -y mono-complete
33+
mono --version
34+
2335
- name: Cache Tools
24-
uses: actions/cache@v4.3.0
36+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
2537
with:
2638
path: tools
2739
key: ${{ runner.os }}-doc-tools-${{ hashFiles('recipe.cake') }}
2840

2941
- name: Publishing documentation
30-
uses: cake-build/cake-action@v3.0.1
42+
uses: cake-build/cake-action@d218f1133bb74a1df0b08c89cfd8fc100c09e1a0 # v3
3143
with:
3244
script-path: recipe.cake
3345
target: Force-Publish-Documentation
3446
verbosity: Diagnostic
35-
cake-version: 1.3.0
36-
cake-bootstrap: true
47+
cake-version: tool-manifest

.github/workflows/release-notes.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,36 @@ jobs:
1111

1212
steps:
1313
- name: Checkout the requested branch
14-
uses: actions/checkout@v5.0.0
15-
- name: Fetch all tags and branches
16-
run: git fetch --prune --unshallow
14+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
15+
with:
16+
fetch-depth: 0
1717
- name: Cache Tools
18-
uses: actions/cache@v4.3.0
18+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
1919
with:
2020
path: tools
2121
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
2222
- name: Set up git version
2323
if: ${{ !contains(github.ref, '/hotfix/') && !contains(github.ref, '/release/') }}
24-
uses: gittools/actions/gitversion/setup@v4.1.0
24+
uses: gittools/actions/gitversion/setup@d0139503a9321f76b4a417dfdc8aebcec24decdd # v4.2.0
2525
with:
2626
versionSpec: "5.x"
2727
- name: Run git version
2828
if: ${{ !contains(github.ref, '/hotfix/') && !contains(github.ref, '/release/') }}
2929
id: gitversion
30-
uses: gittools/actions/gitversion/execute@v4.1.0
30+
uses: gittools/actions/gitversion/execute@d0139503a9321f76b4a417dfdc8aebcec24decdd # v4.2.0
3131
- name: Create release branch ${{ github.event.inputs.version }}
3232
if: ${{ steps.gitversion.outputs.majorMinorPatch }}
3333
run: git switch -c release/${{ steps.gitversion.outputs.majorMinorPatch }}
3434
- name: Push new branch
3535
if: ${{ steps.gitversion.outputs.majorMinorPatch }}
36-
uses: ad-m/[email protected]
36+
uses: ad-m/github-push-action@77c5b412c50b723d2a4fbc6d71fb5723bcd439aa # v1.0.0
3737
with:
3838
branch: "release/${{ steps.gitversion.outputs.majorMinorPatch }}"
3939
github_token: ${{ secrets.GH_TOKEN }}
4040
- name: Drafting Release Notes
41-
uses: cake-build/cake-action@v3.0.1
41+
uses: cake-build/cake-action@d218f1133bb74a1df0b08c89cfd8fc100c09e1a0 # v3
4242
with:
4343
script-path: recipe.cake
4444
target: releasenotes
4545
verbosity: Diagnostic
46-
cake-version: 1.3.0
47-
cake-bootstrap: true
46+
cake-version: tool-manifest

0 commit comments

Comments
 (0)