-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changes for including arm64 binaries (#290)
- Loading branch information
1 parent
65a0527
commit 10a361c
Showing
34 changed files
with
1,252 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: build and push to acr | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: 'Environment to build' | ||
required: true | ||
default: 'development' | ||
type: choice | ||
options: | ||
- development | ||
- staging | ||
- prod | ||
jobs: | ||
docker: | ||
strategy: | ||
matrix: | ||
include: | ||
- components: devhostagent | ||
imageName: lpkremoteagent | ||
- components: devhostagent.restorationjob | ||
imageName: lpkrestorationjob | ||
- components: routingmanager | ||
imageName: routingmanager | ||
runs-on: ubuntu-latest | ||
environment: ${{ github.event.inputs.environment }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ vars.ACR_REGISTRY }} | ||
username: ${{ secrets.ACR_USERNAME }} | ||
password: ${{ secrets.ACR_PASSWORD }} | ||
- name: Set telemetry variables | ||
shell: bash | ||
run: | | ||
if [ $GITHUB_REF == "refs/heads/main" ]; then | ||
echo "##vso[task.setvariable variable=TelemetryType]TELEMETRY_PRODUCTION" | ||
else | ||
echo "##vso[task.setvariable variable=TelemetryType]TELEMETRY_DEVELOPMENT" | ||
fi | ||
- name: Set image tags | ||
shell: bash | ||
id: version | ||
run: | | ||
chmod +x ./deployment/settings/setenvironmentvariables.sh | ||
`./deployment/settings/setenvironmentvariables.sh deployment/settings/services/imagetag.setting` | ||
printenv | grep "MINDARO" | ||
if [ ${{ matrix.components}} == "devhostagent" ]; then | ||
echo "tag=$MINDARO_DEVHOSTAGENT_TAG" >> $GITHUB_ENV | ||
elif [ ${{ matrix.components}} == "devhostagent.restorationjob" ]; then | ||
echo "tag=$MINDARO_DEVHOSTAGENT_RESTORATIONJOB_TAG" >> $GITHUB_ENV | ||
else | ||
echo "tag=$MINDARO_ROUTINGMANAGER_TAG" >> $GITHUB_ENV | ||
fi | ||
- name: Build and push for ${{ matrix.components }} | ||
uses: docker/build-push-action@v5 | ||
with: | ||
file: src/${{ matrix.components }}/Dockerfile | ||
platforms: linux/arm64,linux/amd64 | ||
push: true | ||
tags: ${{ vars.ACR_REGISTRY }}/${{ matrix.imageName }}:${{ env.tag }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: PR build pipeline | ||
on: [workflow_dispatch] | ||
|
||
jobs: | ||
self-contained: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
mode: [osx-x64,linux-x64,win-x64,win-arm64,osx-arm64,linux-arm64] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: 7.0.x | ||
- name: Setup NuGet.exe for use with actions | ||
uses: NuGet/setup-nuget@v1.0.6 | ||
- name: Restore dependencies using Nuget | ||
run: nuget restore src\client.sln -Verbosity Normal -NonInteractive -ConfigFile src/nuget.config | ||
- name: dotnet Publish for ${{ matrix.mode }} | ||
run: dotnet publish src\dsc\dsc.csproj -c Release -r ${{ matrix.mode }} --no-restore --self-contained true --verbosity normal | ||
- name: Build endpointmanagerlauncher | ||
if: ${{ matrix.mode == 'win-x64' || matrix.mode == 'win-arm64'}} | ||
run: dotnet publish src\EndpointManagerLauncher\endpointmanagerlauncher.csproj -r ${{ matrix.mode }} -c Release --no-restore | ||
- name: Run unit test cases | ||
run: | | ||
dotnet restore src\unittest.sln | ||
dotnet test src\unittest.sln -c Release --no-restore --verbosity normal | ||
non-self-contained: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
mode: [osx-x64,linux-x64,win-x64,win-arm64,osx-arm64,linux-arm64] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: 7.0.x | ||
- name: Setup NuGet.exe for use with actions | ||
uses: NuGet/setup-nuget@v1.0.6 | ||
- name: Restore dependencies using Nuget | ||
run: nuget restore src\client.sln -Verbosity Normal -NonInteractive -ConfigFile src/nuget.config | ||
- name: dotnet Publish for ${{ matrix.mode }} | ||
run: dotnet publish src\dsc\dsc.csproj -c Release -r ${{ matrix.mode }} --no-restore --self-contained false --verbosity normal | ||
- name: Build endpointmanagerlauncher | ||
if: ${{ matrix.mode == 'win-x64' || matrix.mode == 'win-arm64'}} | ||
run: dotnet publish src\EndpointManagerLauncher\endpointmanagerlauncher.csproj -r ${{ matrix.mode }} -c Release --no-restore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.