Skip to content

CI/CD: update actions to fix Node 12 deprecation warnings #35

CI/CD: update actions to fix Node 12 deprecation warnings

CI/CD: update actions to fix Node 12 deprecation warnings #35

on: push
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Setup CMake
uses: jwlawson/actions-setup-cmake@v1.14
with:
cmake-version: 3.22.x
- name: Checkout code
uses: actions/checkout@v3
- name: Install gtest and gcovr
env:
DEBIAN_FRONTEND: noninteractive
run: sudo apt-get -qq update && sudo apt-get install -qq -y libgtest-dev gcovr
- name: Run tests
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Debug .
make -C build pmalloc_test
# this needs privileges for reading the physical address and modifying
# the amount of huge pages allocated by the system
sudo make -C build coverage
- name: Analyze test results
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Test results
path: build/junit.xml
reporter: jest-junit
- name: Upload coverage report to codecov
uses: codecov/codecov-action@v3
with:
files: build/coverage.xml
build:
name: Build packages
runs-on: ubuntu-latest
needs: test
strategy:
matrix:
os:
- name: ubuntu
version: bionic
- name: ubuntu
version: focal
- name: ubuntu
version: jammy
- name: debian
version: bullseye
- name: debian
version: bookworm
- name: debian
version: testing
container:
image: ${{ matrix.os.name }}:${{ matrix.os.version }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install build dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: apt-get -qq update && apt-get install -qq -y build-essential cmake file
- name: Build package for ${{ matrix.os.name }} ${{ matrix.os.version }}
run: |
mkdir -p build && cd build && \
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_SHARED_LIBS=on \
-DCPACK_DEBIAN_PACKAGE_RELEASE=+ci$GITHUB_RUN_ID \
../ && \
make package
- name: Uploading artifacts
uses: actions/upload-artifact@v3
with:
name: pmalloc-${{ matrix.os.name }}-${{ matrix.os.version }}
path: |
build/libpmalloc_*.deb
build/libpmalloc-dev_*.deb
build/libpmalloc-dbgsym*.ddeb