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
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1.1
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
|
||||
- name: Download NuGet packages
|
||||
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
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-artifacts
|
||||
path: windows/bin
|
||||
|
||||
+18
-12
@@ -16,11 +16,11 @@ jobs:
|
||||
env:
|
||||
CFLAGS: -Werror
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v4
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.9"
|
||||
- name: Install Ubuntu Prerequisites
|
||||
@@ -47,7 +47,7 @@ jobs:
|
||||
name: Test Utils (ubuntu-latest)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install Ubuntu Prerequisites
|
||||
@@ -77,7 +77,7 @@ jobs:
|
||||
matrix:
|
||||
# ubuntu-latest == ubuntu-22.04
|
||||
# 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"]
|
||||
gcrypt: ["--with-local-libgcrypt", ""]
|
||||
compiler: ["cc"]
|
||||
@@ -168,11 +168,11 @@ jobs:
|
||||
msan: "" # Disable sanitizer on macos
|
||||
nBPF: ""
|
||||
- compiler: "cc"
|
||||
os: macos-12
|
||||
os: macos-14
|
||||
arch: "x86_64"
|
||||
gcrypt: ""
|
||||
pcre: "--with-pcre2"
|
||||
maxminddb: "--with-maxminddb"
|
||||
pcre: ""
|
||||
maxminddb: ""
|
||||
msan: "" # Disable sanitizer on macos
|
||||
nBPF: ""
|
||||
- compiler: "cc"
|
||||
@@ -204,7 +204,7 @@ jobs:
|
||||
if: startsWith(matrix.os, 'ubuntu') && !startsWith(matrix.arch, 'x86_64')
|
||||
run: |
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||
- name: Install Ubuntu Prerequisites
|
||||
@@ -315,11 +315,17 @@ jobs:
|
||||
msys2 -c 'make all'
|
||||
msys2 -c 'ldd ./example/ndpiReader.exe'
|
||||
- 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: |
|
||||
make all
|
||||
make -C example ndpiSimpleIntegration
|
||||
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
|
||||
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows')
|
||||
run: |
|
||||
@@ -327,8 +333,8 @@ jobs:
|
||||
- name: Install nDPI
|
||||
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows')
|
||||
run: |
|
||||
make install DESTDIR=$(realpath _install)
|
||||
ls -alhHR _install
|
||||
DESTDIR=/tmp/ndpi make install
|
||||
ls -alhHR /tmp/ndpi
|
||||
- name: Test nDPI [SYMBOLS]
|
||||
if: (startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'mac')) && startsWith(matrix.arch, 'x86_64')
|
||||
run: |
|
||||
@@ -341,7 +347,7 @@ jobs:
|
||||
./tests/do.sh
|
||||
- name: Test nDPI [UNIT]
|
||||
#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: |
|
||||
./tests/do-unit.sh
|
||||
- name: Test nDPI [DGA]
|
||||
|
||||
@@ -12,7 +12,7 @@ jobs:
|
||||
env:
|
||||
CFLAGS: -Werror
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install Ubuntu Prerequisites
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
- name: Generate Coverage Report
|
||||
run: |
|
||||
make coverage
|
||||
- uses: actions/upload-artifact@v3
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ndpi-coverage-report
|
||||
path: coverage_report
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
name: Documentation (ubuntu-latest)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up Python 3.9
|
||||
@@ -63,7 +63,7 @@ jobs:
|
||||
make doc
|
||||
mkdir -vp doc/_build/ndpi-documentation-upload/ndpi-documentation
|
||||
mv -v doc/_build/html doc/_build/ndpi-documentation-upload/ndpi-documentation/html
|
||||
- uses: actions/upload-artifact@v3
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ndpi-documentation
|
||||
path: doc/_build/ndpi-documentation-upload
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
GO111MODULE: on
|
||||
CFLAGS: -Werror
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- 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/heap_profile.png ndpi-performance-upload/${PROFILE}_heap_profile.png
|
||||
done
|
||||
- uses: actions/upload-artifact@v3
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ndpi-performance
|
||||
path: ndpi-performance-upload
|
||||
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
run: |
|
||||
exit $(ls out/artifacts |wc -l)
|
||||
- name: Upload Crash (upload detected crash as artifacts)
|
||||
uses: actions/upload-artifact@v1
|
||||
uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
with:
|
||||
name: ${{ matrix.sanitizer }}-artifacts
|
||||
|
||||
@@ -24,10 +24,10 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'cpp', 'python', 'ruby' ]
|
||||
language: [ 'cpp', 'python' ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- 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
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
|
||||
@@ -54,6 +54,6 @@ jobs:
|
||||
make
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
|
||||
Reference in New Issue
Block a user