blob: 7ea37a5f62fe2b15c9c1afafe41c2092c686722e [file] [log] [blame]
name: "MiNiFi-CPP verify gcc13 compatibility"
on: [workflow_dispatch]
jobs:
ubuntu_22_04:
name: "ubuntu-22.04-gcc-13"
runs-on: ubuntu-22.04
timeout-minutes: 300
steps:
- id: free_disk_space
run: |
# We can gain additional disk space on the Ubuntu runners thanks to these suggestions:
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
# https://github.com/actions/runner-images/issues/2606#issuecomment-772683150
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- id: checkout
uses: actions/checkout@v3
- id: install_deps
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install -y ccache libfl-dev libpcap-dev libboost-all-dev openjdk-8-jdk maven libusb-1.0-0-dev libpng-dev libgps-dev libsqliteodbc lua5.3 liblua5.3-dev flake8 parallel gcc-13 g++-13
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
echo -e "127.0.0.1\t$HOSTNAME" | sudo tee -a /etc/hosts > /dev/null
- name: build
run: |
export CC=gcc-13
export CXX=g++-13
./bootstrap.sh -e -t
cd build
cmake -DUSE_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCI_BUILD=ON -DSTRICT_GSL_CHECKS=AUDIT -DFAIL_ON_WARNINGS=ON -DENABLE_ALL=ON ..
make -j$(nproc) VERBOSE=1
- name: test
id: test
run: |
# Set core file size limit to 1GiB
ulimit -c 1048576
cd build && make test ARGS="--timeout 300 -j8 --output-on-failure"
- name: check-cores
if: ${{ failure() && steps.test.conclusion == 'failure' }}
run: |
if [ "$(ls -A /var/lib/apport/coredump/)" ]; then echo "CORES_EXIST=true" >> $GITHUB_ENV; fi
- uses: actions/upload-artifact@v3.1.2
if: ${{ failure() && env.CORES_EXIST == 'true' }}
with:
name: ubuntu-coredumps
path: /var/lib/apport/coredump/
- uses: actions/upload-artifact@v3.1.2
if: ${{ failure() && env.CORES_EXIST == 'true' }}
with:
name: ubuntu-binaries
path: build/bin