Skip to content

Commit

Permalink
Add workflow for building .NET NuGet packages (#3468)
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone authored Jan 31, 2025
1 parent ae65597 commit fdd1614
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 4 deletions.
22 changes: 22 additions & 0 deletions .github/actions/build-slice-compiler/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Build Slice Compiler"
description: "Builds a Slice compiler from C++ source for multiple platforms"

inputs:
compiler-name:
description: "Name of the compiler to build"
required: true

runs:
using: "composite"
steps:
- name: Build on Windows
if: runner.os == 'Windows'
run: |
MSBuild msbuild/ice.proj /p:Configuration=Release /p:Platform=x64 /t:${{ inputs.compiler-name }}
shell: cmd

- name: Build on Linux/macOS
if: runner.os != 'Windows'
run: |
make OPTIMIZE=yes V=1 ${{ inputs.compiler-name }}
shell: bash
68 changes: 68 additions & 0 deletions .github/workflows/build-dotnet-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: "Build .NET Packages"

on:
workflow_call:
workflow_dispatch:

jobs:
build-slice-compilers:
strategy:
matrix:
include:
- os: macos-latest
artifact-path: bin/slice2cs*
- os: windows-latest
artifact-path: bin/Release/x64/slice2cs*
- os: ubuntu-24.04
artifact-path: bin/slice2cs*
- os: ubuntu-24.04-arm64
artifact-path: bin/slice2cs*

runs-on: ${{ matrix.os }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Dependencies
uses: ./.github/actions/setup-dependencies

- name: Build Compiler
uses: ./.github/actions/build-slice-compiler
with:
compiler-name: slice2cs

- name: Upload Compiler Artifact
uses: actions/upload-artifact@v4
with:
name: slice2cs-${{ matrix.os }}
path: ${{ matrix.artifact-path }}
pack-dotnet:
runs-on: windows-latest
needs: build-slice-compilers

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Create Tools Directory
run: mkdir tools
shell: cmd

- name: Download All Compiler Artifacts
uses: actions/download-artifact@v4
with:
path: tools

- name: Set SLICE2CS_STAGING_PATH
run: echo "SLICE2CS_STAGING_PATH=$PWD/tools" >> $GITHUB_ENV
shell: bash

- name: Pack .NET Packages
run: dotnet msbuild csharp/msbuild/ice.proj /t:Pack

- name: Upload NuGet Packages
uses: actions/upload-artifact@v4
with:
name: dotnet-nuget-packages
path: csharp/msbuild/zeroc.ice.net/*.nupkg
1 change: 0 additions & 1 deletion packaging/dpkg/debian/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ zeroc-icebox/*
zeroc-icegrid/*
zeroc-icegridgui/*
zeroc-icepatch2/*

1 change: 0 additions & 1 deletion packaging/dpkg/debian/BuildInstructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ repository.

## Building the Ice packages


$ cd ice-debian-packaging
$ gbp buildpackage

Expand Down
1 change: 0 additions & 1 deletion packaging/dpkg/debian/README
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ Feature highlights:
communications through firewalls
- IcePatch2, an efficient software distribution and patching service


Getting Started with Ice on Linux
---------------------------------

Expand Down
2 changes: 1 addition & 1 deletion packaging/dpkg/debian/libzeroc-ice3.8.postrm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
if [ "$1" = "purge" ]; then
# We remove /var/lib/ice on purge
rm -rf /var/lib/ice

# Remove /var/lib/ice override
dpkg-statoverride --remove /var/lib/ice >/dev/null 2>/dev/null || true

Expand Down

0 comments on commit fdd1614

Please sign in to comment.