Skip to content

Commit

Permalink
Nightly Workflow Fixes (#3547)
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone authored Feb 14, 2025
1 parent 2fc68f3 commit 2fc12fc
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/actions/build-rpm-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ runs:
with:
name: rpm-packages-${{ inputs.distribution }}-${{ inputs.arch }}
path: |
*.rpm
build/RPMS/*
- name: Publish RPM Packages
run: |
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/build-cpp-nuget-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "Build C++ Nuget Package"

on:
workflow_call:
inputs:
ice_version:
required: false
type: string
source_url:
required: false
type: string
secrets:
NUGET_API_KEY:
required: false
workflow_dispatch:
inputs:
ice_version:
description: "The Ice version to build"
required: false
source_url:
description: "The URL of the NuGet repository to publish to"
required: false
type: string

jobs:
build-cpp-nuget-package:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Build C++ NuGet Packages
run: msbuild /m ice.proj /t:Pack /p:BuildAllConfigurations=yes
working-directory: cpp/msbuild

- name: Upload NuGet Packages
uses: actions/upload-artifact@v4
with:
name: windows-cpp-nuget-packages
path: |
cpp/msbuild/zeroc.ice.v143/*.nupkg
- name: Publish NuGet Packages
run: |
dotnet nuget push cpp\msbuild\zeroc.ice.v143\*.nupkg --source ${{ inputs.source_url }} --api-key ${{ secrets.NUGET_API_KEY }}
if: inputs.source_url != ''
7 changes: 4 additions & 3 deletions .github/workflows/build-msi-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ jobs:
- name: Setup Dependencies
uses: ./.github/actions/setup-dependencies

- name: Build C++ NuGet Packages
# TODO Download from NuGet
- name: Build C++ Binaries
run: msbuild /m ice.proj /p:Platform=x64 /p:Configuration=Release
working-directory: cpp/msbuild

Expand All @@ -29,9 +30,9 @@ jobs:
# TODO compute this variable see issue #3558
VCInstallDir: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC"

- name: Upload NuGet Packages
- name: Upload MSI
uses: actions/upload-artifact@v4
with:
name: windows-msi-and-nuget-packages
name: windows-msi
path: |
packaging/msi/bin/x64/Release/*.msi
10 changes: 10 additions & 0 deletions .github/workflows/build-nightly-release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ jobs:
# - RPM: 3.8.0~0.nightly<YYYYMMDD>.<BUILD>
echo "rpm_version=${VERSION}~0.nightly${DATE}.${BUILD}" >> $GITHUB_OUTPUT
build-cpp-nuget-package:
name: Build C++ NuGet Package
uses: ./.github/workflows/build-cpp-nuget-package.yml
needs: set-version
with:
ice_version: ${{ needs.set-version.outputs.nuget_version }}
source_url: "${{ inputs.repository_url }}/nuget-nightly/"
secrets:
NUGET_API_KEY: ${{ secrets.NEXUS_NIGHTLY_NUGET_API_KEY }}

build-deb-packages:
name: Build DEB Packages
uses: ./.github/workflows/build-deb-packages.yml
Expand Down
8 changes: 6 additions & 2 deletions packaging/dpkg/publish-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ if [ -z "${REPOSITORY_URL}" ]; then
exit 1
fi

# Iterate over all .deb and .ddeb files in the current directory and subdirectories
find . -type f \( -name "*.deb" -o -name "*.ddeb" \) | while read -r file; do
# We build the packages in /workspace/build. The dpkg-buildpackage command creates the package files in the parent
# directory.
cd /workspace/

# Iterate over all .deb and .ddeb files in the current directory
find . -depth 1 -type f \( -name "*.deb" -o -name "*.ddeb" \) | while read -r file; do
echo "Uploading $file to Nexus..."
curl -u "${REPOSITORY_USERNAME}:${REPOSITORY_PASSWORD}" \
-H "Content-Type: multipart/form-data" \
Expand Down
3 changes: 3 additions & 0 deletions packaging/rpm/publish-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ if [ -z "${REPOSITORY_URL}" ]; then
exit 1
fi

# The rpmbuild command creates the package files in the RPMS directory.
cd /workspace/build/RPMS

# Iterate over all .rpm files in the current directory and subdirectories
find . -type f -name "*.rpm" | while read -r file; do
echo "Uploading $file to Nexus..."
Expand Down

0 comments on commit 2fc12fc

Please sign in to comment.