summaryrefslogtreecommitdiffstats
path: root/.github/workflows/build.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-21 17:19:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-21 17:19:04 +0000
commit310edf444908b09ea6d00c03baceb7925f3bb7a2 (patch)
tree7064577c7fa7a851e2e930beb606ea8237b0bbd2 /.github/workflows/build.yml
parentReleasing debian version 1.44.3-2. (diff)
downloadnetdata-310edf444908b09ea6d00c03baceb7925f3bb7a2.tar.xz
netdata-310edf444908b09ea6d00c03baceb7925f3bb7a2.zip
Merging upstream version 1.45.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r--.github/workflows/build.yml211
1 files changed, 123 insertions, 88 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 4a6debc46..7ca83d867 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -34,35 +34,46 @@ jobs:
submodules: recursive
- name: Check files
id: check-files
- uses: tj-actions/changed-files@v40
+ uses: tj-actions/changed-files@v43
with:
since_last_remote_commit: ${{ github.event_name != 'pull_request' }}
files: |
- **.c
- **.cc
- **.h
- **.hh
- **.in
- configure.ac
+ **/*.c
+ **/*.cc
+ **/*.h
+ **/*.hh
+ **/*.in
+ **/*.patch
+ **/*.cmake
+ CMakeLists.txt
netdata-installer.sh
- **/Makefile*
- Makefile*
.github/data/distros.yml
.github/workflows/build.yml
.github/scripts/build-static.sh
.github/scripts/get-static-cache-key.sh
.github/scripts/gen-matrix-build.py
.github/scripts/run-updater-check.sh
- build/**
- packaging/makeself/**
- packaging/installer/**
- aclk/aclk-schemas/
- ml/dlib/
- mqtt_websockets
- web/server/h2o/libh2o
+ packaging/cmake/
+ packaging/makeself/
+ packaging/installer/
+ packaging/*.sh
+ packaging/*.version
+ packaging/*.checksums
+ src/aclk/aclk-schemas/
+ src/ml/dlib/
+ src/fluent-bit/
+ src/web/server/h2o/libh2o/
files_ignore: |
netdata.spec.in
- **.md
+ **/*.md
+ - name: List all changed files in pattern
+ continue-on-error: true
+ env:
+ ALL_CHANGED_FILES: ${{ steps.check-files.outputs.all_changed_files }}
+ run: |
+ for file in ${ALL_CHANGED_FILES}; do
+ echo "$file was changed"
+ done
- name: Check Run
id: check-run
run: |
@@ -105,24 +116,17 @@ jobs:
id: build
if: needs.file-check.outputs.run == 'true'
run: |
- git describe
- mkdir -p artifacts
- ./packaging/installer/install-required-packages.sh --dont-wait --non-interactive netdata
- autoreconf -ivf
- ./configure --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --libexecdir=/usr/libexec \
- --with-zlib \
- --with-math \
- --with-user=netdata
- make dist
+ mkdir -p artifacts/
+ tar --create --file "artifacts/netdata-$(git describe).tar.gz" \
+ --sort=name --posix --auto-compress --exclude=artifacts/ --exclude=.git \
+ --exclude=.gitignore --exclude=.gitattributes --exclude=.gitmodules \
+ --transform "s/^\\.\\//netdata-$(git describe)\\//" --verbose .
+ cd artifacts/
echo "distfile=$(find . -name 'netdata-*.tar.gz')" >> "${GITHUB_OUTPUT}"
- cp netdata-*.tar.gz artifacts/
- name: Store
id: store
if: needs.file-check.outputs.run == 'true'
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: dist-tarball
path: artifacts/*.tar.gz
@@ -161,6 +165,7 @@ jobs:
matrix:
arch:
- x86_64
+ - armv6l
- armv7l
- aarch64
- ppc64le
@@ -193,7 +198,7 @@ jobs:
- name: Cache
if: (github.event_name != 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'run-ci/no-cache')) && needs.file-check.outputs.run == 'true'
id: cache
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: artifacts/cache
key: ${{ steps.cache-key.outputs.key }}
@@ -203,7 +208,7 @@ jobs:
- name: Build
if: github.event_name == 'workflow_dispatch' && needs.file-check.outputs.run == 'true'
id: build
- uses: nick-fields/retry@v2
+ uses: nick-fields/retry@v3
with:
timeout_minutes: 180
max_attempts: 3
@@ -211,9 +216,9 @@ jobs:
- name: Store
id: store
if: needs.file-check.outputs.run == 'true'
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
- name: static-archive
+ name: dist-static-${{ matrix.arch }}
path: artifacts/*.gz.run
retention-days: 30
- name: Failure Notification
@@ -354,7 +359,7 @@ jobs:
tags: test:${{ matrix.artifact_key }}
- name: Upload image artifact
id: upload
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_key }}-test-env
path: /tmp/image.tar
@@ -410,19 +415,18 @@ jobs:
- name: Fetch test environment
id: fetch
if: needs.file-check.outputs.run == 'true'
- uses: actions/download-artifact@v3
+ uses: Wandalen/wretry.action@v1
with:
- name: ${{ matrix.artifact_key }}-test-env
+ action: actions/download-artifact@v4
+ with: |
+ name: ${{ matrix.artifact_key }}-test-env
+ path: .
+ attempt_limit: 3
+ attempt_delay: 2000
- name: Load test environment
id: load
if: needs.file-check.outputs.run == 'true'
run: docker load --input image.tar
- - name: Regular build on ${{ matrix.distro }}
- id: build-basic
- if: needs.file-check.outputs.run == 'true'
- run: |
- docker run --security-opt seccomp=unconfined -w /netdata test:${{ matrix.artifact_key }} \
- /bin/sh -c 'autoreconf -ivf && ./configure --disable-dependency-tracking && make -j2'
- name: netdata-installer on ${{ matrix.distro }}, disable cloud
id: build-no-cloud
if: needs.file-check.outputs.run == 'true'
@@ -454,7 +458,6 @@ jobs:
Checkout: ${{ steps.checkout.outcome }}
Fetch test environment: ${{ steps.fetch.outcome }}
Load test environment: ${{ steps.load.outcome }}
- Regular build: ${{ steps.build-basic.outcome }}
netdata-installer, disable cloud: ${{ steps.build-no-cloud.outcome }}
netdata-installer, require cloud: ${{ steps.build-cloud.outcome }}
netdata-installer, no JSON-C: ${{ steps.build-no-jsonc.outcome }}
@@ -500,27 +503,40 @@ jobs:
- name: Fetch dist tarball artifacts
id: fetch-tarball
if: needs.file-check.outputs.run == 'true'
- uses: actions/download-artifact@v3
+ uses: Wandalen/wretry.action@v1
with:
- name: dist-tarball
- path: dist-tarball
+ action: actions/download-artifact@v4
+ with: |
+ name: dist-tarball
+ path: dist-tarball
+ attempt_limit: 3
+ attempt_delay: 2000
- name: Prepare artifact directory
id: prepare
if: needs.file-check.outputs.run == 'true'
run: |
- mkdir -p artifacts/download/latest || exit 1
- echo "9999.0.0-0" > artifacts/download/latest/latest-version.txt || exit 1
- cp dist-tarball/* artifacts/download/latest || exit 1
- cd artifacts/download/latest || exit 1
+ mkdir -p artifacts/download/v9999.0.0 || exit 1
+ mkdir -p artifacts/latest || exit 1
+ echo "v9999.0.0" > artifacts/latest/latest-version.txt || exit 1
+ cp dist-tarball/* artifacts/download/v9999.0.0 || exit 1
+ cd artifacts/download/v9999.0.0 || exit 1
ln -s ${{ needs.build-dist.outputs.distfile }} netdata-latest.tar.gz || exit 1
+ ls -lFh
sha256sum -b ./* > "sha256sums.txt" || exit 1
cat sha256sums.txt
+ cd ../.. || exit 1
+ ls -lR
- name: Fetch test environment
id: fetch-test-environment
if: needs.file-check.outputs.run == 'true'
- uses: actions/download-artifact@v3
+ uses: Wandalen/wretry.action@v1
with:
- name: ${{ matrix.artifact_key }}-test-env
+ action: actions/download-artifact@v4
+ with: |
+ name: ${{ matrix.artifact_key }}-test-env
+ path: .
+ attempt_limit: 3
+ attempt_delay: 2000
- name: Load test environment
id: load
if: needs.file-check.outputs.run == 'true'
@@ -577,27 +593,24 @@ jobs:
id: prepare
if: needs.file-check.outputs.run == 'true'
run: mkdir -p artifacts
- - name: Retrieve Dist Tarball
+ - name: Retrieve Build Artifacts
id: fetch-dist
if: needs.file-check.outputs.run == 'true'
- uses: actions/download-artifact@v3
+ uses: Wandalen/wretry.action@v1
with:
- name: dist-tarball
- path: dist-tarball
- - name: Retrieve Static Build Artifacts
- id: fetch-static
- if: needs.file-check.outputs.run == 'true'
- uses: actions/download-artifact@v3
- with:
- name: static-archive
- path: static-archive
+ action: actions/download-artifact@v4
+ with: |
+ pattern: dist-*
+ path: dist-artifacts
+ merge-multiple: true
+ attempt_limit: 3
+ attempt_delay: 2000
- name: Prepare Artifacts
id: consolidate
if: needs.file-check.outputs.run == 'true'
working-directory: ./artifacts/
run: |
- mv ../dist-tarball/* . || exit 1
- mv ../static-archive/* . || exit 1
+ mv ../dist-artifacts/* . || exit 1
ln -s ${{ needs.build-dist.outputs.distfile }} netdata-latest.tar.gz || exit 1
cp ../packaging/version ./latest-version.txt || exit 1
cp ../integrations/integrations.js ./integrations.js || exit 1
@@ -606,7 +619,7 @@ jobs:
- name: Store Artifacts
id: store
if: needs.file-check.outputs.run == 'true'
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: final-artifacts
path: artifacts/*
@@ -662,16 +675,21 @@ jobs:
- name: Fetch artifacts
id: fetch
if: needs.file-check.outputs.run == 'true'
- uses: actions/download-artifact@v3
+ uses: Wandalen/wretry.action@v1
with:
- name: final-artifacts
- path: artifacts
+ action: actions/download-artifact@v4
+ with: |
+ name: final-artifacts
+ path: artifacts
+ attempt_limit: 3
+ attempt_delay: 2000
- name: Prepare artifacts directory
id: prepare
if: needs.file-check.outputs.run == 'true'
run: |
mkdir -p download/latest
mv artifacts/* download/latest
+ ls -al download/latest
- name: Verify that artifacts work with installer
id: verify
if: needs.file-check.outputs.run == 'true'
@@ -726,16 +744,21 @@ jobs:
- name: Fetch artifacts
id: fetch-artifacts
if: needs.file-check.outputs.run == 'true'
- uses: actions/download-artifact@v3
+ uses: Wandalen/wretry.action@v1
with:
- name: final-artifacts
- path: artifacts
+ action: actions/download-artifact@v4
+ with: |
+ name: final-artifacts
+ path: artifacts
+ attempt_limit: 3
+ attempt_delay: 2000
- name: Prepare artifacts directory
id: prepare
if: needs.file-check.outputs.run == 'true'
run: |
mkdir -p download/latest
mv artifacts/* download/latest
+ ls -al download/latest
- name: Verify that artifacts work with installer
id: verify
if: needs.file-check.outputs.run == 'true'
@@ -775,26 +798,30 @@ jobs:
steps:
- name: Retrieve Artifacts
id: fetch
- uses: actions/download-artifact@v3
+ uses: Wandalen/wretry.action@v1
with:
- name: final-artifacts
- path: final-artifacts
+ action: actions/download-artifact@v4
+ with: |
+ name: final-artifacts
+ path: final-artifacts
+ attempt_limit: 3
+ attempt_delay: 2000
- name: Authenticate to GCS
id: gcs-auth
- uses: google-github-actions/auth@v1
+ uses: google-github-actions/auth@v2
with:
project_id: ${{ secrets.GCP_NIGHTLY_STORAGE_PROJECT }}
credentials_json: ${{ secrets.GCS_STORAGE_SERVICE_KEY_JSON }}
- name: Setup GCS
id: gcs-setup
- uses: google-github-actions/setup-gcloud@v1.1.1
+ uses: google-github-actions/setup-gcloud@v2.0.1
- name: Upload Artifacts
id: upload
- uses: google-github-actions/upload-cloud-storage@v1.0.3
+ uses: google-github-actions/upload-cloud-storage@v2.0.0
with:
destination: ${{ secrets.GCP_NIGHTLY_STORAGE_BUCKET }}
gzip: false
- path: ./final-artifacts
+ path: ./final-artifacts/latest-version.txt
parent: false
- name: Failure Notification
uses: rtCamp/action-slack-notify@v2
@@ -840,10 +867,14 @@ jobs:
token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
- name: Retrieve Artifacts
id: fetch
- uses: actions/download-artifact@v3
+ uses: Wandalen/wretry.action@v1
with:
- name: final-artifacts
- path: final-artifacts
+ action: actions/download-artifact@v4
+ with: |
+ name: final-artifacts
+ path: final-artifacts
+ attempt_limit: 3
+ attempt_delay: 2000
- name: Prepare version info
id: version
run: |
@@ -871,7 +902,7 @@ jobs:
with:
token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
- name: Init python environment for publish release metadata
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
id: init-python
with:
python-version: "3.12"
@@ -954,10 +985,14 @@ jobs:
uses: actions/checkout@v4
- name: Retrieve Artifacts
id: fetch
- uses: actions/download-artifact@v3
+ uses: Wandalen/wretry.action@v1
with:
- name: final-artifacts
- path: final-artifacts
+ action: actions/download-artifact@v4
+ with: |
+ name: final-artifacts
+ path: final-artifacts
+ attempt_limit: 3
+ attempt_delay: 2000
- name: Create Release
id: create-release
uses: ncipollo/release-action@v1