-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cmake on self-runner (#460)
- Loading branch information
Showing
4 changed files
with
20 additions
and
99 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 |
---|---|---|
|
@@ -4,7 +4,7 @@ LABEL author="Everton Haise Taques <[email protected]>" | |
LABEL maintainer="NS1 Labs" | ||
LABEL version="1.0.0" | ||
|
||
ENV BUILD_DEPS "g++ cmake make git pkgconf jq python3-pip python3-setuptools ca-certificates libasan6 zip curl" | ||
ENV BUILD_DEPS "g++ cmake make git pkgconf jq python3-pip python3-setuptools ca-certificates libasan6 zip curl python" | ||
|
||
COPY ./entrypoint.sh /entrypoint.sh | ||
|
||
|
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
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
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 |
---|---|---|
|
@@ -75,6 +75,8 @@ jobs: | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | ||
|
||
runs-on: ubuntu-latest | ||
outputs: | ||
version_number: ${{ steps.build.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
|
@@ -103,6 +105,12 @@ jobs: | |
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12 | ||
run: PKG_CONFIG_PATH=${{github.workspace}}/local/lib/pkgconfig cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE | ||
|
||
- name: Get VERSION | ||
id: build | ||
run: | | ||
echo "VERSION=`cat ${{github.workspace}}/build/VERSION`" >> $GITHUB_ENV | ||
echo "::set-output name=version::$(cat ${{github.workspace}}/build/VERSION)" | ||
- name: Build | ||
working-directory: ${{github.workspace}}/build | ||
shell: bash | ||
|
@@ -125,9 +133,6 @@ jobs: | |
package-amd64: | ||
needs: [ unit-tests-linux ] | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version_number: ${{ steps.build.outputs.version }} | ||
branch_name: ${{ steps.branch.outputs.name }} | ||
# if this is a push into one of our main branches (rather than just a pull request), we will also package | ||
if: github.event_name != 'pull_request' | ||
steps: | ||
|
@@ -151,38 +156,6 @@ jobs: | |
- name: Debug artifacts | ||
run: ls -lha . | ||
|
||
- name: Get branch name | ||
id: branch | ||
shell: bash | ||
run: | | ||
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV | ||
echo "::set-output name=name::$(echo ${GITHUB_REF#refs/heads/} | tr / -)" | ||
- name: Debug branch name | ||
run: echo ${{ env.BRANCH_NAME }} | ||
|
||
- name: Create Build Environment | ||
run: cmake -E make_directory ${{github.workspace}}/build | ||
|
||
- name: Get Conan | ||
uses: turtlebrowser/[email protected] | ||
|
||
- name: Configure CMake to generate VERSION | ||
shell: bash | ||
working-directory: ${{github.workspace}}/build | ||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE | ||
|
||
- name: Get VERSION | ||
id: build | ||
run: | | ||
echo "VERSION=`cat ${{github.workspace}}/build/VERSION`" >> $GITHUB_ENV | ||
echo "::set-output name=version::$(cat ${{github.workspace}}/build/VERSION)" | ||
- name: Debug version | ||
run: | | ||
echo ${{ env.VERSION }} | ||
echo ${{ steps.build.outputs.version }} | ||
- name: Generate ref tag (develop) | ||
run: | | ||
echo "REF_TAG=latest-develop" >> $GITHUB_ENV | ||
|
@@ -233,7 +206,7 @@ jobs: | |
file: ./docker/Dockerfile.crashhandler | ||
platforms: linux/amd64 | ||
push: true | ||
tags: ${{ env.IMAGE_NAME }}:${{ env.VERSION }} , ${{ env.IMAGE_NAME }}:${{ env.REF_TAG }} , ${{ env.IMAGE_NAME2 }}:amd64 | ||
tags: ${{ env.IMAGE_NAME }}:${{ needs.unit-tests-linux.outputs.version_number }} , ${{ env.IMAGE_NAME }}:${{ env.REF_TAG }} , ${{ env.IMAGE_NAME2 }}:amd64 | ||
|
||
build-app-image-x64: | ||
needs: [ package-amd64 ] | ||
|
@@ -661,7 +634,7 @@ jobs: | |
retention-days: 1 | ||
|
||
package-arm64: | ||
needs: [ spinup-arm64-runner ] | ||
needs: [ unit-tests-linux, spinup-arm64-runner ] | ||
runs-on: [self-hosted, linux, ARM64] | ||
if: github.event_name != 'pull_request' | ||
steps: | ||
|
@@ -682,32 +655,9 @@ jobs: | |
with: | ||
context: "." | ||
file: "./Dockerfile" | ||
|
||
- name: Get branch name | ||
shell: bash | ||
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV | ||
|
||
- name: Debug branch name | ||
run: echo ${{ env.BRANCH_NAME }} | ||
|
||
- name: Create Build Environment | ||
run: cmake -E make_directory ${{github.workspace}}/build | ||
|
||
- name: Get Conan | ||
uses: turtlebrowser/[email protected] | ||
|
||
- name: Configure CMake to generate VERSION | ||
shell: bash | ||
working-directory: ${{github.workspace}}/build | ||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE | ||
|
||
- name: Get VERSION | ||
id: build | ||
run: | | ||
echo "VERSION=`cat ${{github.workspace}}/build/VERSION`" >> $GITHUB_ENV | ||
- name: Debug version | ||
run: echo ${{ env.VERSION }} | ||
|
||
- name: Debug artifacts | ||
run: ls -lha . | ||
|
||
- name: Generate ref tag (develop) | ||
if: ${{ env.BRANCH_NAME == 'develop' }} | ||
|
@@ -716,9 +666,6 @@ jobs: | |
echo "PRERELEASE=false" >> $GITHUB_ENV | ||
echo "DRAFT=true" >> $GITHUB_ENV | ||
- name: Debug ref tag | ||
run: echo ${{ env.REF_TAG }} | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
|
@@ -829,33 +776,10 @@ jobs: | |
terraform destroy -auto-approve | ||
pushing-manifests: | ||
needs: [ remove-github-runner-arm64 ] | ||
needs: [ unit-tests-linux, remove-github-runner-arm64 ] | ||
runs-on: ubuntu-latest | ||
if: github.event_name != 'pull_request' | ||
steps: | ||
- name: Get branch name | ||
shell: bash | ||
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV | ||
|
||
- name: Debug branch name | ||
run: echo ${{ env.BRANCH_NAME }} | ||
|
||
- name: Create Build Environment | ||
run: cmake -E make_directory ${{github.workspace}}/build | ||
|
||
- name: Get Conan | ||
uses: turtlebrowser/[email protected] | ||
|
||
- name: Configure CMake to generate VERSION | ||
shell: bash | ||
working-directory: ${{github.workspace}}/build | ||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE | ||
|
||
- name: Get VERSION | ||
id: build | ||
run: | | ||
echo "VERSION=`cat ${{github.workspace}}/build/VERSION`" >> $GITHUB_ENV | ||
steps: | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
|
@@ -868,9 +792,6 @@ jobs: | |
docker manifest create ghcr.io/ns1labs/pktvisor:latest-develop \ | ||
ghcr.io/ns1labs/pktvisor:amd64 \ | ||
ghcr.io/ns1labs/pktvisor:arm64 | ||
docker manifest create ghcr.io/ns1labs/pktvisor:${{ env.VERSION }} \ | ||
ghcr.io/ns1labs/pktvisor:amd64 \ | ||
ghcr.io/ns1labs/pktvisor:arm64 | ||
- name: Push manifest to ghcr.io | ||
run: | | ||
|
@@ -897,7 +818,7 @@ jobs: | |
docker://docker.io/ns1labs/pktvisor:latest-develop | ||
sudo skopeo copy \ | ||
--all \ | ||
docker://ghcr.io/ns1labs/pktvisor:${{ env.VERSION }} \ | ||
docker://docker.io/ns1labs/pktvisor:${{ env.VERSION }} | ||
docker://ghcr.io/ns1labs/pktvisor:latest-develop \ | ||
docker://docker.io/ns1labs/pktvisor:${{ needs.unit-tests-linux.outputs.version_number }} | ||