Skip to content

Remove HPC compiler testing on CI and mention lfortran compatibility … #168

Remove HPC compiler testing on CI and mention lfortran compatibility …

Remove HPC compiler testing on CI and mention lfortran compatibility … #168

Workflow file for this run

name: FortUTF Ubuntu Gfortran 13
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Ubuntu Latest Tests
runs-on: 'ubuntu-24.04'
steps:
- uses: actions/checkout@v4
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.x'
- name: Install Gfortran 13
run: sudo apt install -y gfortran-13
- name: Build Tests
run: |
gfortran-12 --version
cmake -H. -Bbuild -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DCMAKE_Fortran_COMPILER=$(which gfortran-12)
cmake --build build
- name: Run Tests
run: |
./build/FortUTF_Tests
if [ $? -eq 0 ]; then
echo "Unit Tests completed successfully"
exit 0
else
echo "Unit Tests failed"
exit 1
fi
- name: Run Test List
run: |
./build/FortUTF_Tests TEST_FAIL_EQUAL_CHAR TEST_EQUAL_CHAR
if [ $? -eq 0 ]; then
echo "Unit Tests completed succesfully"
exit 0
else
echo "Unit Tests failed"
exit 1
fi
- name: Run Example Tests
run: |
./build/examples/demo_project/DEMO_PROJ_Tests ||
if [ $? -eq 1 ]; then
echo "Unit Tests failed as expected"
exit 0
else
echo "Unit Tests that should fail passed"
exit 1
fi
- name: Get Coverage Data
continue-on-error: true
run: |
sudo apt install -y lcov
lcov --gcov-tool $(which gcov) --directory . --capture --output-file temp.info -b src/
lcov --remove temp.info 'tests/*' 'tests/test_assertions/*' -o FortUTF.info
- uses: codecov/codecov-action@v3
continue-on-error: true
with:
file: FortUTF.info
fail_ci_if_error: true
verbose: true