Skip to content

Commit

Permalink
Merge pull request #33 from Azure/arsdragonfly/2019u2
Browse files Browse the repository at this point in the history
Arsdragonfly/2019u2
  • Loading branch information
arsdragonfly authored Sep 9, 2023
2 parents 03e3aeb + 5699aeb commit ac297cc
Show file tree
Hide file tree
Showing 21 changed files with 1,651 additions and 1,467 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# manual trigger GitHub Actions
# start with an environment with docker, then run docker container with bash script that builds and pushes nuget package to Azure Artifacts specified in secrets
# https://docs.microsoft.com/en-us/azure/devops/artifacts/nuget/publish?view=azure-devops&tabs=windows#push-packages-to-azure-artifacts

name: NuGet
description: 'Build and push NuGet package to Azure Artifacts'
on:
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and push NuGet package
run: |
docker run -t -i --rm \
-e PACKAGE_VERSION=${{ github.event.inputs.version }} \
-e PUBLISH_PACKAGE_FEED=${{ secrets.AZURE_ARTIFACTS_FEED }} \
-e PUBLISH_PACKAGE_USERNAME=${{ secrets.AZURE_ARTIFACTS_USERNAME }} \
-e PUBLISH_PACKAGE_PASSWORD=${{ secrets.AZURE_ARTIFACTS_PASSWORD }} \
-v "$(pwd):/hpcpack-linux-agent" \
-w "/hpcpack-linux-agent/nodemanager" \
ghcr.io/phusion/holy-build-box/hbb-64 \
bash build_and_get_artifact.sh
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "vcpkg"]
path = vcpkg
url = https://github.com/Microsoft/vcpkg.git
3 changes: 3 additions & 0 deletions nodemanager/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build
*.nupkg
nuget.config
56 changes: 56 additions & 0 deletions nodemanager/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
cmake_minimum_required(VERSION 3.15)

project(nodemanager CXX)

set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_TARGET_TRIPLET x64-linux)

find_package(fmt REQUIRED)
find_package(spdlog REQUIRED)
find_package(Boost REQUIRED)
find_package(cpprestsdk REQUIRED)

set(CMAKE_CXX_STANDARD 14)

file(GLOB SOURCES "arguments/*.cpp" "arguements/*.h" "common/*.h" "core/*.cpp" "core/*.h" "data/*.cpp" "data/*.h" "filters/*.cpp" "filters/*.h" "utils/*.cpp" "utils/*.h" "main.cpp" "Version.cpp" "Version.h")

add_executable(nodemanager ${SOURCES})

target_link_libraries(nodemanager PRIVATE fmt::fmt spdlog::spdlog Boost::boost cpprestsdk::cpprest -static-libstdc++)

# pack scripts and compiled executable into hpcnodeagent.tar.gz
add_custom_target(
hpcnodeagent.tar.gz ALL
COMMAND rm -rf ${CMAKE_BINARY_DIR}/hpcnodeagent
COMMAND rm -f ${CMAKE_BINARY_DIR}/hpcnodeagent.tar.gz
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/hpcnodeagent
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/hpcnodeagent/lib
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/hpcnodeagent/Utils
COMMAND cp -r ${CMAKE_SOURCE_DIR}/scripts/* ${CMAKE_BINARY_DIR}/hpcnodeagent
COMMAND cp ${CMAKE_BINARY_DIR}/nodemanager ${CMAKE_BINARY_DIR}/hpcnodeagent
COMMAND cp ${CMAKE_SOURCE_DIR}/config/nodemanager.json ${CMAKE_BINARY_DIR}/hpcnodeagent/nodemanager.json.sample
COMMAND tar -czf ${CMAKE_BINARY_DIR}/hpcnodeagent.tar.gz -C ${CMAKE_BINARY_DIR}/hpcnodeagent .
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
DEPENDS nodemanager
)

add_custom_target(
linuxnodeagent2016u1_reset
COMMAND rm -rf ${CMAKE_BINARY_DIR}/linuxnodeagent2016u1
COMMAND rm -f ${CMAKE_BINARY_DIR}/linuxnodeagent2016u1.zip
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/linuxnodeagent2016u1
)

# pack the linux VM Extension (Yes it's called linuxnodeagent2016u1 ever since 2016u1)
add_custom_target(
linuxnodeagent2016u1.zip ALL
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/linuxnodeagent2016u1/bin
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/linuxnodeagent2016u1/bin/lib
COMMAND cp -r ${CMAKE_SOURCE_DIR}/scripts/* ${CMAKE_BINARY_DIR}/linuxnodeagent2016u1/bin
COMMAND cp ${CMAKE_BINARY_DIR}/nodemanager ${CMAKE_BINARY_DIR}/linuxnodeagent2016u1/bin
COMMAND cp ${CMAKE_SOURCE_DIR}/config/nodemanager.json ${CMAKE_BINARY_DIR}/linuxnodeagent2016u1/bin/nodemanager.json.sample
COMMAND cp -r ${CMAKE_SOURCE_DIR}/../VMExtension/* ${CMAKE_BINARY_DIR}/linuxnodeagent2016u1/
COMMAND zip -r ${CMAKE_BINARY_DIR}/linuxnodeagent2016u1.zip *
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/linuxnodeagent2016u1
DEPENDS nodemanager linuxnodeagent2016u1_reset
)
16 changes: 16 additions & 0 deletions nodemanager/HPCPackLinuxAgent.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<package >
<metadata>
<id>HPCPackLinuxAgent</id>
<version>1.0.0</version>
<authors>HPC Pack</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
<!-- <icon>icon.png</icon> -->
<description>HPC Pack Linux VM Extension and node agent</description>
</metadata>
<files>
<file src="build/hpcnodeagent.tar.gz" target="" />
<file src="build/linuxnodeagent2016u1.zip" target="" />
</files>
</package>
161 changes: 0 additions & 161 deletions nodemanager/NodeManager.cbp

This file was deleted.

Loading

0 comments on commit ac297cc

Please sign in to comment.