Skip to content

Testing c++ only on ubuntu-latest #233

Testing c++ only on ubuntu-latest

Testing c++ only on ubuntu-latest #233

name: Testing c++ only on ubuntu-latest
on:
push:
pull_request:
schedule:
- cron: '0 12 * * 0'
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Set up requirements & configuration variables
run: |
sudo apt-get update
sudo apt-get install build-essential cmake
git submodule update --init --recursive
pip install -r build_requirements.txt
CASM_PREFIX=$(python -c "import site; print(site.getsitepackages()[0])")
echo "CASM_PREFIX=${CASM_PREFIX}" >> "$GITHUB_ENV"
- name: configure
shell: bash
run: |
mkdir build_cxx_only
cd build_cxx_only
cmake -DCASM_PREFIX=${CASM_PREFIX} -DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=0' -DCMAKE_BUILD_TYPE=Release ..
- name: make
shell: bash
run: |
cd build_cxx_only
make -j4 VERBOSE=1
- name: install
shell: bash
run: |
cd build_cxx_only
make install
- name: configure tests
shell: bash
run: |
mkdir build_cxx_test
cd build_cxx_test
cmake -DCASM_PREFIX=${CASM_PREFIX} -DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=0' -DCMAKE_BUILD_TYPE=Release ../tests
- name: make tests
shell: bash
run: |
cd build_cxx_test
make -j4 VERBOSE=1
- name: run tests
shell: bash
run: |
cd build_cxx_test
make test
- name: upload test log
if: always()
uses: actions/upload-artifact@v6
with:
name: libcasm-global-cxx-test-log
path: build_cxx_test/Testing/Temporary/LastTest.log