GitHub Actions: update to latest macOS runners (#2293)
Add a simple job with macos-14 on M1. https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/) There are some issues with external dependencies (they are installed but autoconf script doens;t find them) so keep it simple. On macos-13 it seems that: * there is no `realpath` program (even if coreutils has been installed...) * most of the filesystem is read only (we can't write on /usr/lib). So I change ``` make install DESTDIR=$(realpath _install) ls -alhHR _install ``` to ``` DESTDIR=/tmp/ndpi make install ls -alhHR /tmp/ndpi ``` for all the jobs Fix a warning on GitHub logs: ``` Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/. ```
This commit is contained in:
@@ -15,10 +15,10 @@ jobs:
|
|||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Add msbuild to PATH
|
- name: Add msbuild to PATH
|
||||||
uses: microsoft/setup-msbuild@v1.1
|
uses: microsoft/setup-msbuild@v2
|
||||||
|
|
||||||
- name: Download NuGet packages
|
- name: Download NuGet packages
|
||||||
run: msbuild windows/nDPI.sln -t:restore -p:RestorePackagesConfig=true
|
run: msbuild windows/nDPI.sln -t:restore -p:RestorePackagesConfig=true
|
||||||
@@ -36,7 +36,7 @@ jobs:
|
|||||||
run: msbuild windows/nDPI.sln -t:rebuild -property:Configuration=Debug-ndpiReader
|
run: msbuild windows/nDPI.sln -t:rebuild -property:Configuration=Debug-ndpiReader
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: build-artifacts
|
name: build-artifacts
|
||||||
path: windows/bin
|
path: windows/bin
|
||||||
|
|||||||
+18
-12
@@ -16,11 +16,11 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CFLAGS: -Werror
|
CFLAGS: -Werror
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Set up Python 3.9
|
- name: Set up Python 3.9
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.9"
|
python-version: "3.9"
|
||||||
- name: Install Ubuntu Prerequisites
|
- name: Install Ubuntu Prerequisites
|
||||||
@@ -47,7 +47,7 @@ jobs:
|
|||||||
name: Test Utils (ubuntu-latest)
|
name: Test Utils (ubuntu-latest)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Install Ubuntu Prerequisites
|
- name: Install Ubuntu Prerequisites
|
||||||
@@ -77,7 +77,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
# ubuntu-latest == ubuntu-22.04
|
# ubuntu-latest == ubuntu-22.04
|
||||||
# macOS-latest == macos-12
|
# macOS-latest == macos-12
|
||||||
os: ["ubuntu-latest", "ubuntu-20.04", "macOS-latest", "macos-11", "windows-latest"]
|
os: ["ubuntu-latest", "ubuntu-20.04", "macOS-latest", "macos-13", "windows-latest"]
|
||||||
arch: ["x86_64"]
|
arch: ["x86_64"]
|
||||||
gcrypt: ["--with-local-libgcrypt", ""]
|
gcrypt: ["--with-local-libgcrypt", ""]
|
||||||
compiler: ["cc"]
|
compiler: ["cc"]
|
||||||
@@ -168,11 +168,11 @@ jobs:
|
|||||||
msan: "" # Disable sanitizer on macos
|
msan: "" # Disable sanitizer on macos
|
||||||
nBPF: ""
|
nBPF: ""
|
||||||
- compiler: "cc"
|
- compiler: "cc"
|
||||||
os: macos-12
|
os: macos-14
|
||||||
arch: "x86_64"
|
arch: "x86_64"
|
||||||
gcrypt: ""
|
gcrypt: ""
|
||||||
pcre: "--with-pcre2"
|
pcre: ""
|
||||||
maxminddb: "--with-maxminddb"
|
maxminddb: ""
|
||||||
msan: "" # Disable sanitizer on macos
|
msan: "" # Disable sanitizer on macos
|
||||||
nBPF: ""
|
nBPF: ""
|
||||||
- compiler: "cc"
|
- compiler: "cc"
|
||||||
@@ -204,7 +204,7 @@ jobs:
|
|||||||
if: startsWith(matrix.os, 'ubuntu') && !startsWith(matrix.arch, 'x86_64')
|
if: startsWith(matrix.os, 'ubuntu') && !startsWith(matrix.arch, 'x86_64')
|
||||||
run: |
|
run: |
|
||||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||||
- name: Install Ubuntu Prerequisites
|
- name: Install Ubuntu Prerequisites
|
||||||
@@ -315,11 +315,17 @@ jobs:
|
|||||||
msys2 -c 'make all'
|
msys2 -c 'make all'
|
||||||
msys2 -c 'ldd ./example/ndpiReader.exe'
|
msys2 -c 'ldd ./example/ndpiReader.exe'
|
||||||
- name: Build nDPI
|
- name: Build nDPI
|
||||||
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows')
|
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows') && !startsWith(matrix.os, 'macos-14')
|
||||||
run: |
|
run: |
|
||||||
make all
|
make all
|
||||||
make -C example ndpiSimpleIntegration
|
make -C example ndpiSimpleIntegration
|
||||||
make -C rrdtool
|
make -C rrdtool
|
||||||
|
- name: Build nDPI (MacOS M1)
|
||||||
|
if: startsWith(matrix.os, 'macos-14')
|
||||||
|
run: |
|
||||||
|
make all
|
||||||
|
make -C example ndpiSimpleIntegration
|
||||||
|
#There are somes issues with librrd
|
||||||
- name: Print nDPI long help
|
- name: Print nDPI long help
|
||||||
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows')
|
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows')
|
||||||
run: |
|
run: |
|
||||||
@@ -327,8 +333,8 @@ jobs:
|
|||||||
- name: Install nDPI
|
- name: Install nDPI
|
||||||
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows')
|
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows')
|
||||||
run: |
|
run: |
|
||||||
make install DESTDIR=$(realpath _install)
|
DESTDIR=/tmp/ndpi make install
|
||||||
ls -alhHR _install
|
ls -alhHR /tmp/ndpi
|
||||||
- name: Test nDPI [SYMBOLS]
|
- name: Test nDPI [SYMBOLS]
|
||||||
if: (startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'mac')) && startsWith(matrix.arch, 'x86_64')
|
if: (startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'mac')) && startsWith(matrix.arch, 'x86_64')
|
||||||
run: |
|
run: |
|
||||||
@@ -341,7 +347,7 @@ jobs:
|
|||||||
./tests/do.sh
|
./tests/do.sh
|
||||||
- name: Test nDPI [UNIT]
|
- name: Test nDPI [UNIT]
|
||||||
#Some issues with masan + json-c. Disable the test as workaround
|
#Some issues with masan + json-c. Disable the test as workaround
|
||||||
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows') && !startsWith(matrix.msan, '--with-memory-sanitizer')
|
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows') && !startsWith(matrix.msan, '--with-memory-sanitizer') && !startsWith(matrix.os, 'macos-14')
|
||||||
run: |
|
run: |
|
||||||
./tests/do-unit.sh
|
./tests/do-unit.sh
|
||||||
- name: Test nDPI [DGA]
|
- name: Test nDPI [DGA]
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CFLAGS: -Werror
|
CFLAGS: -Werror
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Install Ubuntu Prerequisites
|
- name: Install Ubuntu Prerequisites
|
||||||
@@ -32,7 +32,7 @@ jobs:
|
|||||||
- name: Generate Coverage Report
|
- name: Generate Coverage Report
|
||||||
run: |
|
run: |
|
||||||
make coverage
|
make coverage
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ndpi-coverage-report
|
name: ndpi-coverage-report
|
||||||
path: coverage_report
|
path: coverage_report
|
||||||
@@ -42,7 +42,7 @@ jobs:
|
|||||||
name: Documentation (ubuntu-latest)
|
name: Documentation (ubuntu-latest)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Set up Python 3.9
|
- name: Set up Python 3.9
|
||||||
@@ -63,7 +63,7 @@ jobs:
|
|||||||
make doc
|
make doc
|
||||||
mkdir -vp doc/_build/ndpi-documentation-upload/ndpi-documentation
|
mkdir -vp doc/_build/ndpi-documentation-upload/ndpi-documentation
|
||||||
mv -v doc/_build/html doc/_build/ndpi-documentation-upload/ndpi-documentation/html
|
mv -v doc/_build/html doc/_build/ndpi-documentation-upload/ndpi-documentation/html
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ndpi-documentation
|
name: ndpi-documentation
|
||||||
path: doc/_build/ndpi-documentation-upload
|
path: doc/_build/ndpi-documentation-upload
|
||||||
@@ -76,7 +76,7 @@ jobs:
|
|||||||
GO111MODULE: on
|
GO111MODULE: on
|
||||||
CFLAGS: -Werror
|
CFLAGS: -Werror
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Install Ubuntu Prerequisites
|
- name: Install Ubuntu Prerequisites
|
||||||
@@ -104,7 +104,7 @@ jobs:
|
|||||||
mv -v tests/cfgs/${PROFILE}/result/cpu_profile.png ndpi-performance-upload/${PROFILE}_cpu_profile.png
|
mv -v tests/cfgs/${PROFILE}/result/cpu_profile.png ndpi-performance-upload/${PROFILE}_cpu_profile.png
|
||||||
mv -v tests/cfgs/${PROFILE}/result/heap_profile.png ndpi-performance-upload/${PROFILE}_heap_profile.png
|
mv -v tests/cfgs/${PROFILE}/result/heap_profile.png ndpi-performance-upload/${PROFILE}_heap_profile.png
|
||||||
done
|
done
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ndpi-performance
|
name: ndpi-performance
|
||||||
path: ndpi-performance-upload
|
path: ndpi-performance-upload
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
exit $(ls out/artifacts |wc -l)
|
exit $(ls out/artifacts |wc -l)
|
||||||
- name: Upload Crash (upload detected crash as artifacts)
|
- name: Upload Crash (upload detected crash as artifacts)
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v4
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.sanitizer }}-artifacts
|
name: ${{ matrix.sanitizer }}-artifacts
|
||||||
|
|||||||
@@ -24,10 +24,10 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
language: [ 'cpp', 'python', 'ruby' ]
|
language: [ 'cpp', 'python' ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Install Ubuntu Prerequisites
|
- name: Install Ubuntu Prerequisites
|
||||||
@@ -45,7 +45,7 @@ jobs:
|
|||||||
./autogen.sh --enable-gprof --enable-option-checking=fatal --with-pcre2 --with-maxminddb --enable-tls-sigs --enable-debug-messages
|
./autogen.sh --enable-gprof --enable-option-checking=fatal --with-pcre2 --with-maxminddb --enable-tls-sigs --enable-debug-messages
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v2
|
uses: github/codeql-action/init@v3
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
|
|
||||||
@@ -54,6 +54,6 @@ jobs:
|
|||||||
make
|
make
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v2
|
uses: github/codeql-action/analyze@v3
|
||||||
with:
|
with:
|
||||||
category: "/language:${{matrix.language}}"
|
category: "/language:${{matrix.language}}"
|
||||||
|
|||||||
Reference in New Issue
Block a user