Skip to content

Fixed wrong test_be generation in bin directory #620

Fixed wrong test_be generation in bin directory

Fixed wrong test_be generation in bin directory #620

# This file based on https://gist.github.com/mwouts/9842452d020c08faf9e84a3bba38a66f
# See: https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners
# 2022-08-06 - slg - Updated os to be 'macos-latest', 'ubuntu-20.04', 'ubuntu-22.04'
# See https://github.com/actions/virtual-environments for details.
# 2020-06-22 - slg - customized
# 2020-06-27 - slg - expanded to G++ for MacOS
# 2020-07-03 - slg - ported to be13_api; removed python (be13_api doesn't use python)
# 2021-05-07 - slg - Started work again
# 2022-02-10 - slg - renamed be20_api. Our work here is done.
name: BE2 Unit Tests on MacOS and Ubuntu (c++17)
on: [push, pull_request]
jobs:
# https://github.com/marketplace/actions/skip-duplicate-actions
pre_job:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['macos-latest', 'ubuntu-latest']
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/[email protected]
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
concurrent_skipping: 'never'
skip_after_successful_duplicate: 'true'
paths_ignore: '["**/README.md", "**/docs/**"]'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
main_job:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['macos-latest', 'ubuntu-latest']
env:
DEBUG_5G: FALSE
DEBUG_FAST: TRUE
steps:
# https://github.com/actions/checkout
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: "MacOS: run CONFIGURE_MACOS.bash"
if: startsWith(matrix.os, 'macos')
run: |
echo "" | bash etc/CONFIGURE_MACOS.bash
- name: "Ubuntu: run CONFIGURE_UBUNTU20LTS.bash"
if: startsWith(matrix.os, 'ubuntu')
run: |
echo "" | bash etc/CONFIGURE_UBUNTU20LTS.bash
- name: C++ checks with address-sanitizer (Mac and Linux)
run: |
echo GCC VERSION:
gcc --version
echo G++ VERSION:
g++ --version
bash bootstrap.sh
echo === Try Address Sanitizer Without Optimization ===
./configure -q --disable-opt --enable-address-sanitizer
make clean
make all
(cd src; make check || (cat test-suite.log; exit 1))
make distclean
echo === Try Address Sanitizer Optimization ===
./configure -q --enable-address-sanitizer
make clean
make all
(cd src; make check || (cat test-suite.log; exit 1))
make distclean
- name: C++ checks with thread-sanitizer on ubuntu are disabled
if: startsWith(matrix.os, 'ubuntu-DISABLED')
run: |
bash bootstrap.sh
./configure -q --enable-silent-rules --enable-thread-sanitizer
make clean
make all
(cd src; make check || (cat test-suite.log; exit 1))
make distclean
- name: C++ checks with codecov
if: startsWith(matrix.os, 'ubuntu')
run: |
bash bootstrap.sh
./configure -q --disable-opt --enable-silent-rules CFLAGS='-g -O0 -fprofile-arcs -ftest-coverage' CXXFLAGS='-g -O0 -fprofile-arcs -ftest-coverage' LIBS='-lgcov'
make clean
make all
cd src
make check || (echo ==error== ; cat test-suite.log; exit 1)
- name: upload codecov report
if: startsWith(matrix.os, 'ubuntu')
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
cd src
gcov-9 -o . *.cpp be20_api/*.cpp
bash <(curl -s https://codecov.io/bash)
#
# set up and run codecov
#
## sudo apt install -y gpg
## curl https://keybase.io/codecovsecurity/pgp_keys.asc | \
## gpg --no-default-keyring --keyring trustedkeys.gpg --import
## curl -Os https://uploader.codecov.io/latest/linux/codecov
## curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
## curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
## gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
## shasum -a 256 -c codecov.SHA256SUM
## chmod +x codecov && ./codecov -t ${CODECOV_TOKEN}
- uses: ammaraskar/[email protected]
name: GCC Problem Matcher
- name: distcheck
run: |
./configure -q
make clean
make distcheck