diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1d215dc0..67741bd4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -28,17 +28,17 @@ jobs:
./artifacts/pkg/**/*
./artifacts/tst/**/*
if-no-files-found: error
- linux-x64:
- runs-on: ${{ matrix.os }}-latest
+ windows-arm64:
+ runs-on: ${{ matrix.os }}-11-arm
strategy:
matrix:
- architecture: [ x64 ]
+ architecture: [ arm64 ]
configuration: [ debug, release ]
- os: [ ubuntu ]
+ os: [ windows ]
steps:
- uses: actions/checkout@v4
- - run: ./scripts/cibuild.sh --configuration ${{ matrix.configuration }} --architecture ${{ matrix.architecture }}
- shell: bash
+ - run: ./scripts/cibuild.cmd -configuration ${{ matrix.configuration }} -architecture ${{ matrix.architecture }}
+ shell: cmd
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}_${{ matrix.configuration }}_${{ matrix.architecture }}
@@ -48,13 +48,13 @@ jobs:
./artifacts/pkg/**/*
./artifacts/tst/**/*
if-no-files-found: error
- macos-arm64:
+ linux-x64:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
- architecture: [ arm64 ]
+ architecture: [ x64 ]
configuration: [ debug, release ]
- os: [ macos ]
+ os: [ ubuntu ]
steps:
- uses: actions/checkout@v4
- run: ./scripts/cibuild.sh --configuration ${{ matrix.configuration }} --architecture ${{ matrix.architecture }}
@@ -68,77 +68,59 @@ jobs:
./artifacts/pkg/**/*
./artifacts/tst/**/*
if-no-files-found: error
- build-nuget-preview:
- runs-on: windows-latest
+ linux-arm64:
+ runs-on: ${{ matrix.os }}-24.04-arm
+ strategy:
+ matrix:
+ architecture: [ arm64 ]
+ configuration: [ debug, release ]
+ os: [ ubuntu ]
steps:
- uses: actions/checkout@v4
- - run: ./scripts/cibuild.cmd -configuration release -architecture x64
- shell: cmd
- env:
- EXCLUDE_RUN_ID_FROM_PACKAGE: true
- EXCLUDE_SUFFIX_FROM_VERSION: false
+ - run: ./scripts/cibuild.sh --configuration ${{ matrix.configuration }} --architecture ${{ matrix.architecture }}
+ shell: bash
- uses: actions/upload-artifact@v4
with:
- name: nuget_preview
+ name: ${{ matrix.os }}_${{ matrix.configuration }}_${{ matrix.architecture }}
path: |
./artifacts/bin/**/*
./artifacts/log/**/*
./artifacts/pkg/**/*
./artifacts/tst/**/*
if-no-files-found: error
- sign-nuget-preview:
- runs-on: windows-latest
- if: ${{ github.event_name == 'push' }}
- needs: [ build-nuget-preview ]
- permissions:
- id-token: write
- steps:
- - uses: actions/checkout@v4
- - uses: actions/download-artifact@v4
- with:
- name: nuget_preview
- path: ./artifacts
- - uses: actions/setup-dotnet@v4
- with:
- global-json-file: ./global.json
- - run: dotnet tool install --tool-path ./artifacts/tools sign --version 0.9.1-beta.24170.3
- - run: ./artifacts/tools/sign code azure-key-vault "**/*.nupkg" --timestamp-url "http://timestamp.digicert.com" --base-directory "${{ github.workspace }}/artifacts/pkg" --file-list "${{ github.workspace }}/scripts/SignClientFileList.txt" --publisher-name ".NET Foundation" --description "ClangSharp" --description-url "https://github.com/dotnet/clangsharp" --azure-key-vault-certificate "${{ secrets.SC_KEY_VAULT_CERTIFICATE_ID }}" --azure-key-vault-client-id "${{ secrets.SC_AZURE_CLIENT_ID }}" --azure-key-vault-client-secret "${{ secrets.SC_AZURE_CLIENT_SECRET }}" --azure-key-vault-tenant-id "${{ secrets.SC_AZURE_TENANT_ID }}" --azure-key-vault-url "${{ secrets.SC_KEY_VAULT_URL }}"
- - uses: actions/upload-artifact@v4
- with:
- name: sign_nuget_preview
- path: |
- ./artifacts/pkg/**/*
- if-no-files-found: error
- build-nuget-release:
- runs-on: windows-latest
+ macos-arm64:
+ runs-on: ${{ matrix.os }}-latest
+ strategy:
+ matrix:
+ architecture: [ arm64 ]
+ configuration: [ debug, release ]
+ os: [ macos ]
steps:
- uses: actions/checkout@v4
- - run: ./scripts/cibuild.cmd -configuration release -architecture x64
- shell: cmd
- env:
- EXCLUDE_RUN_ID_FROM_PACKAGE: true
- EXCLUDE_SUFFIX_FROM_VERSION: true
+ - run: ./scripts/cibuild.sh --configuration ${{ matrix.configuration }} --architecture ${{ matrix.architecture }}
+ shell: bash
- uses: actions/upload-artifact@v4
with:
- name: nuget_release
+ name: ${{ matrix.os }}_${{ matrix.configuration }}_${{ matrix.architecture }}
path: |
./artifacts/bin/**/*
./artifacts/log/**/*
./artifacts/pkg/**/*
./artifacts/tst/**/*
if-no-files-found: error
- sign-nuget-release:
+ sign-nuget:
runs-on: windows-latest
if: ${{ github.event_name == 'push' }}
- needs: [ build-nuget-release ]
+ needs: [ windows-x64, windows-arm64, linux-x64, linux-arm64, macos-arm64 ]
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
- name: nuget_release
+ merge-multiple: true
path: ./artifacts
+ pattern: "./artifacts/pkg/Release/**/*"
- uses: actions/setup-dotnet@v4
with:
global-json-file: ./global.json
@@ -146,18 +128,18 @@ jobs:
- run: ./artifacts/tools/sign code azure-key-vault "**/*.nupkg" --timestamp-url "http://timestamp.digicert.com" --base-directory "${{ github.workspace }}/artifacts/pkg" --file-list "${{ github.workspace }}/scripts/SignClientFileList.txt" --publisher-name ".NET Foundation" --description "ClangSharp" --description-url "https://github.com/dotnet/clangsharp" --azure-key-vault-certificate "${{ secrets.SC_KEY_VAULT_CERTIFICATE_ID }}" --azure-key-vault-client-id "${{ secrets.SC_AZURE_CLIENT_ID }}" --azure-key-vault-client-secret "${{ secrets.SC_AZURE_CLIENT_SECRET }}" --azure-key-vault-tenant-id "${{ secrets.SC_AZURE_TENANT_ID }}" --azure-key-vault-url "${{ secrets.SC_KEY_VAULT_URL }}"
- uses: actions/upload-artifact@v4
with:
- name: sign_nuget_release
+ name: sign_nuget
path: |
- ./artifacts/pkg/**/*
+ ./artifacts/pkg/Release/*
if-no-files-found: error
publish-nightlies-azure:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
- needs: [ windows-x64, linux-x64, macos-arm64, sign-nuget-preview, sign-nuget-release ]
+ needs: [ sign-nuget ]
steps:
- uses: actions/download-artifact@v4
with:
- name: windows_release_x64
+ name: sign-nuget
path: ./artifacts
- uses: actions/setup-dotnet@v4
with:
@@ -173,7 +155,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
- name: windows_release_x64
+ name: sign-nuget
path: ./artifacts
- uses: actions/setup-dotnet@v4
with:
diff --git a/Directory.Build.props b/Directory.Build.props
index 2a8cf672..66a4d5e4 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -43,12 +43,12 @@
.NET Foundation
true
true
- $(BaseArtifactsPath)pkg/$(Configuration)/
+ $(BaseArtifactsPath)pkg/$(Configuration)/$(PACKAGE_PUBLISH_MODE)
17.0.0
ClangSharp
ClangSharp
- 20.1.2.1
- rc1
+ 20.1.2.2
+ rc1
pr
diff --git a/Directory.Build.targets b/Directory.Build.targets
index db24925f..35862658 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -17,7 +17,7 @@
- $(Version).$(GITHUB_RUN_ID)
+ $(Version).$(GITHUB_RUN_ID)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 0c1271a9..b9a02164 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -14,9 +14,9 @@
-
-
-
+
+
+
diff --git a/scripts/build.ps1 b/scripts/build.ps1
index 51865694..8abfe764 100644
--- a/scripts/build.ps1
+++ b/scripts/build.ps1
@@ -56,8 +56,13 @@ function Help() {
}
function Pack() {
- $logFile = Join-Path -Path $LogDir -ChildPath "$configuration\pack.binlog"
- & dotnet pack -c "$configuration" --no-build --no-restore -v "$verbosity" /bl:"$logFile" /err $properties "$solution"
+ $logFile = Join-Path -Path $LogDir -ChildPath "$configuration\pack"
+ & dotnet pack -c "$configuration" --no-build --no-restore -v "$verbosity" /bl:"$logFile.binlog" /err $properties "$solution"
+
+ if ($ci) {
+ & dotnet pack -c "$configuration" --no-build --no-restore -v "$verbosity" /bl:"$logFile.preview.binlog" /err /p:PACKAGE_PUBLISH_MODE=preview $properties "$solution"
+ & dotnet pack -c "$configuration" --no-build --no-restore -v "$verbosity" /bl:"$logFile.stable.binlog" /err /p:PACKAGE_PUBLISH_MODE=stable $properties "$solution"
+ }
if ($LastExitCode -ne 0) {
throw "'Pack' failed for '$solution'"
diff --git a/scripts/build.sh b/scripts/build.sh
index 7429bd46..8d07019d 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -115,14 +115,24 @@ function Help {
}
function Pack {
- logFile="$LogDir/$configuration/pack.binlog"
+ logFile="$LogDir/$configuration/pack"
if [[ -z "$properties" ]]; then
- dotnet pack -c "$configuration" --no-build --no-restore -v "$verbosity" /bl:"$logFile" /err "$solution"
+ dotnet pack -c "$configuration" --no-build --no-restore -v "$verbosity" /bl:"$logFile.binlog" /err "$solution"
else
- dotnet pack -c "$configuration" --no-build --no-restore -v "$verbosity" /bl:"$logFile" /err "${properties[@]}" "$solution"
+ dotnet pack -c "$configuration" --no-build --no-restore -v "$verbosity" /bl:"$logFile.binlog" /err "${properties[@]}" "$solution"
fi
+if $ci; then
+ if [[ -z "$properties" ]]; then
+ dotnet pack -c "$configuration" --no-build --no-restore -v "$verbosity" /bl:"$logFile.preview.binlog" /err /p:PACKAGE_PUBLISH_MODE=preview "$solution"
+ dotnet pack -c "$configuration" --no-build --no-restore -v "$verbosity" /bl:"$logFile.stable.binlog" /err /p:PACKAGE_PUBLISH_MODE=stable "$solution"
+ else
+ dotnet pack -c "$configuration" --no-build --no-restore -v "$verbosity" /bl:"$logFile.preview.binlog" /err /p:PACKAGE_PUBLISH_MODE=preview "${properties[@]}" "$solution"
+ dotnet pack -c "$configuration" --no-build --no-restore -v "$verbosity" /bl:"$logFile.stable.binlog" /err /p:PACKAGE_PUBLISH_MODE=stable "${properties[@]}" "$solution"
+ fi
+fi
+
LASTEXITCODE=$?
if [ "$LASTEXITCODE" != 0 ]; then
diff --git a/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj b/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj
index 111dc037..e440fdc7 100644
--- a/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj
+++ b/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj
@@ -4,8 +4,9 @@
Exe
true
- win-x64
-
+ true
+ linux-arm64;linux-x64;osx-arm64;win-arm64;win-x64
+ true
net10.0