Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
450f164
Pivot to use vcpkg to build natives
ha-ves Apr 26, 2026
df31759
* Add NetCord.Natives project and vcpkg support
ha-ves Apr 29, 2026
9117822
feat: native library support and testing
ha-ves Apr 30, 2026
8871328
* Refactor NetCord.Natives.csproj for improved build configuration
ha-ves May 4, 2026
4877959
* Refactor native library handling and packaging
ha-ves May 5, 2026
925460c
CI finished & fix typos & guarding
ha-ves May 5, 2026
57ac8b1
solution build fix
ha-ves May 5, 2026
2f1ab0b
separate solution for natives
ha-ves May 5, 2026
9def22b
refactor native build/test pipeline
ha-ves May 8, 2026
4a9dc0d
Clean up & atomize CI workflows
ha-ves May 10, 2026
29e03ef
Apply typos and internals fixes
ha-ves May 21, 2026
4ac12da
Resolve PR comments
Copilot May 26, 2026
243c384
Revert to not using nix for building the natives,
ha-ves May 26, 2026
9a796fd
separate nix workflow & fix warn-no-error
ha-ves May 30, 2026
9a2f59d
fix checkout submodules
ha-ves May 30, 2026
f6c6a43
[skip ci] rearrange nix & fix vcpkg
ha-ves May 30, 2026
3bd4cff
restructure netcord.natives
ha-ves Jun 14, 2026
d688e22
Use symlink to versioned shared libs
ha-ves Jun 14, 2026
13605f1
fix bootstrapping & update vcpkg baseline
ha-ves Jun 18, 2026
d31bd94
Fix use namespace reflection for libimports
ha-ves Jun 20, 2026
4f5e553
fix osx nativeaot test build
ha-ves Jun 20, 2026
689a8b4
fix flake.nix for osx compiler
ha-ves Jun 21, 2026
6e9ef6c
Enable InvariantGlobalization and remove icu
KubaZ2 Jun 21, 2026
fac0d1a
Remove default macos12 target
KubaZ2 Jun 21, 2026
2d71f37
Add arm64-apple-darwin target
KubaZ2 Jun 21, 2026
df0fe6d
Disable symbol stripping
KubaZ2 Jun 21, 2026
e2f42d8
Remove custom linker args
KubaZ2 Jun 21, 2026
0977ec2
Remove invalid comments
KubaZ2 Jun 21, 2026
c8bc2b5
# This is a combination of 2 commits.
KubaZ2 Jun 21, 2026
31e4d2c
Attempt to fix flake.nix and make it use apple sdk 12 target
KubaZ2 Jun 22, 2026
c3a5203
Override stdenv to target macOS 12
KubaZ2 Jun 22, 2026
0d33f70
Add MACOSX_DEPLOYMENT_TARGET env variable set to 12.0
KubaZ2 Jun 22, 2026
0111ef6
Add VCPKG_ENV_PASSTHROUGH
KubaZ2 Jun 22, 2026
c18d2a5
Cleanup macOS stuff in flake.nix
KubaZ2 Jun 22, 2026
2138e51
Cleanup NetCord.Natives.csproj
KubaZ2 Jun 22, 2026
f508fa1
add binlogpath to nativeaotapp test
ha-ves Jun 22, 2026
618e497
Add musl builds
KubaZ2 Jun 22, 2026
b10e143
Improve musl options and automatically set default VCPKG_ROOT in flak…
KubaZ2 Jun 22, 2026
8754966
Add CI builds and tests for musl
KubaZ2 Jun 22, 2026
1c842af
Fix ifs in workflows
KubaZ2 Jun 22, 2026
b879bdb
Fix musl tests and merge musl and non-musl tests into a single step
KubaZ2 Jun 23, 2026
14e5b38
Fix daveMaxSupportedProtocolVersion pinvoke in a test
KubaZ2 Jun 23, 2026
db8af65
Add Nix cache to CI
KubaZ2 Jun 23, 2026
bcc9519
Rearrange targets
ha-ves Jun 23, 2026
56e5860
[skip ci] Test NativeAOT publish using MSBuild API
ha-ves Jun 23, 2026
ab030df
Rearrange natives test s
ha-ves Jun 25, 2026
eec7ae3
Remove musl triplets since already overriden via cross compiler & nix
ha-ves Jun 25, 2026
af15eee
Pass Configuration env variable to musl tests
KubaZ2 Jun 23, 2026
762d662
Set max-jobs and cores to 2 for linux arm64 runner building for musl
KubaZ2 Jun 24, 2026
e40f8bd
Add missing packages to flake.nix
KubaZ2 Jun 24, 2026
29457ec
Add x64 musl build
KubaZ2 Jun 22, 2026
46b15e7
Add arm64-linux-musl triplets
KubaZ2 Jun 24, 2026
b118af3
Packge per native deps for all runtimeid
ha-ves Jun 25, 2026
ec8279f
Move vcpkg triplets dir
ha-ves Jun 25, 2026
0a6c53e
Fix workflow
ha-ves Jun 25, 2026
f3b1315
use nuget cache for vcpkg
ha-ves Jun 25, 2026
8a6344f
fix windows workflow & disable vcpkg metrics
ha-ves Jun 25, 2026
ac814f1
Use apple sdk 12 instead of 14
ha-ves Jun 25, 2026
ca2d7c0
Fix vcpkg nuget cache
KubaZ2 Jun 25, 2026
1365b56
Set max jobs to 1 for musl arm64 builds and remove cores limit
KubaZ2 Jun 26, 2026
acdb52a
Add setup dev env step for nix
KubaZ2 Jun 26, 2026
5732313
Revert "fix nuget vcpkg cache integration"
KubaZ2 Jun 26, 2026
5df965d
Fix vcpkg fetch nuget
KubaZ2 Jun 26, 2026
0a3c8be
Limit cores to 3 for musl arm64 in CI
KubaZ2 Jun 26, 2026
f132125
Fix pack
KubaZ2 Jun 27, 2026
fb72ddd
Fix the pack fix
KubaZ2 Jun 27, 2026
9762a3b
add vcpkg github package caching
ha-ves Jun 27, 2026
8923e2f
provide vcpkg cache nuget.config
ha-ves Jun 27, 2026
7684089
fix workflow
ha-ves Jun 27, 2026
edf0999
add defaultpushsource
ha-ves Jun 27, 2026
a4f879d
Condense symlinking & natives handling
ha-ves Jul 4, 2026
5d1ca8b
fix build files packaged path
ha-ves Jul 4, 2026
8ceb368
Add meta package depends on all native libs
ha-ves Jul 4, 2026
4465eda
Parallelize per natives packaging
ha-ves Jul 4, 2026
762f3ce
Fix CI & osx symlink
ha-ves Jul 4, 2026
fd12cc6
[skip ci] fix linux CI
ha-ves Jul 4, 2026
88bd464
Fix vcpkg ssl static so it doesnt conflict with dotnet
ha-ves Jul 5, 2026
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
35 changes: 35 additions & 0 deletions .github/workflows/build-and-publish-natives.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build & Publish NetCord.Natives

on:
workflow_dispatch:
push:
paths:
- 'Natives/**'
- '.github/workflows/build-natives.yml'
- '.github/workflows/build-and-publish-natives.yml'
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-*"

jobs:
build-natives:
uses: ./.github/workflows/build-natives.yml

publish:
needs: [build-natives]
runs-on: ubuntu-latest

steps:
- name: Download All NuGet Package Artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: artifacts/pkgs
pattern: NetCord.Natives.*.packages
merge-multiple: true

- name: Publish packages
env:
KEY: ${{ secrets.NUGET_API_KEY }}
run: |
dotnet nuget push artifacts/pkgs/*.nupkg -k $KEY -s https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push artifacts/pkgs/*.snupkg -k $KEY -s https://api.nuget.org/v3/index.json --skip-duplicate
87 changes: 21 additions & 66 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,30 @@ on:
- "[0-9]+.[0-9]+.[0-9]+-*"

jobs:
build-and-publish:
build:
uses: ./.github/workflows/build.yml

publish:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

- name: Download NuGet Package Artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: NuGet Packages
path: artifacts/pkgs

- name: Download Documentation Artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
fetch-depth: 0
filter: tree:0
name: Documentation Artifacts
path: artifacts/docs

- name: Install Nix
uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
Expand All @@ -26,50 +39,13 @@ jobs:
shell: &dev-shell 'nix develop -c bash -eo pipefail {0}'
run: 'true'

- name: Restore dependencies
shell: *dev-shell
run: dotnet restore

- name: Build
shell: *dev-shell
run: dotnet build -c Release --no-restore --warnaserror

- name: Test
shell: *dev-shell
run: dotnet test -c Release --no-build --verbosity normal

- name: Pack Packages
shell: *dev-shell
run: |
dotnet pack NetCord -c Release --no-build
dotnet pack NetCord.Services -c Release --no-build
dotnet pack Hosting/NetCord.Hosting -c Release --no-build
dotnet pack Hosting/NetCord.Hosting.Services -c Release --no-build
dotnet pack Hosting/NetCord.Hosting.AspNetCore -c Release --no-build

- name: Setup docs environment
shell: &docs-shell 'nix develop .#docs -c bash -eo pipefail {0}'
run: 'true'

- name: Build Documentation
shell: *docs-shell
working-directory: Documentation
run: |
npm install
npm run lint
npm run test
npm run build

- name: Publish Packages
shell: *dev-shell
env:
KEY: ${{ secrets.NUGET_API_KEY }}
run: |
dotnet nuget push NetCord/bin/Release/*.nupkg -k $KEY -s https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push NetCord.Services/bin/Release/*.nupkg -k $KEY -s https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push Hosting/NetCord.Hosting/bin/Release/*.nupkg -k $KEY -s https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push Hosting/NetCord.Hosting.Services/bin/Release/*.nupkg -k $KEY -s https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push Hosting/NetCord.Hosting.AspNetCore/bin/Release/*.nupkg -k $KEY -s https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push artifacts/pkgs/*.nupkg -k $KEY -s https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push artifacts/pkgs/*.snupkg -k $KEY -s https://api.nuget.org/v3/index.json --skip-duplicate

- name: Deploy Documentation
uses: appleboy/scp-action@ff85246acaad7bdce478db94a363cd2bf7c90345 # v1.0.0
Expand All @@ -79,7 +55,7 @@ jobs:
port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_KEY }}
rm: true
source: Documentation/_site
source: artifacts/docs
strip_components: 2
target: ~/NetCord/html

Expand All @@ -89,19 +65,15 @@ jobs:
TAG: ${{ github.ref_name }}
IS_PRERELEASE: ${{ contains(github.ref_name, '-') }}
run: |
cp -r Documentation/_site "Documentation-$TAG"
cp -r artifacts/docs "Documentation-$TAG"

zip -r "Documentation-$TAG.zip" "Documentation-$TAG"
tar -czvf "Documentation-$TAG.tar.gz" "Documentation-$TAG"

rm -r "Documentation-$TAG"

FILES=(
NetCord/bin/Release/*.*nupkg
NetCord.Services/bin/Release/*.*nupkg
Hosting/NetCord.Hosting/bin/Release/*.*nupkg
Hosting/NetCord.Hosting.Services/bin/Release/*.*nupkg
Hosting/NetCord.Hosting.AspNetCore/bin/Release/*.*nupkg
artifacts/pkgs/*.nupkg
"Documentation-$TAG.zip"
"Documentation-$TAG.tar.gz"
)
Expand All @@ -116,20 +88,3 @@ jobs:
--prerelease="$IS_PRERELEASE" \
"${FILES[@]}"
fi

- name: Upload Build Artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: Build Artifacts
path: |
NetCord/bin/Release
NetCord.Services/bin/Release
Hosting/NetCord.Hosting/bin/Release
Hosting/NetCord.Hosting.Services/bin/Release
Hosting/NetCord.Hosting.AspNetCore/bin/Release

- name: Upload Documentation Artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: Documentation Artifacts
path: Documentation/_site
Loading