Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TriBITS CI testing with GitHub Actions (#363) #389

Closed
Changes from 23 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
62cc3ed
#377: - first try with CI
marcinwrobel1986 Jul 15, 2021
42c175a
#377: - added no fortran option
marcinwrobel1986 Jul 15, 2021
ad56911
#377: - run job only when push on master branch
marcinwrobel1986 Jul 15, 2021
2c1af51
#377: - attempt to try different variants
marcinwrobel1986 Jul 16, 2021
15959a7
#377: - added version checking
marcinwrobel1986 Jul 16, 2021
dabbcf8
#377: - try to get specific versions
marcinwrobel1986 Jul 16, 2021
3fabb91
#377: - separate removing and installation
marcinwrobel1986 Jul 16, 2021
3d15fef
#377: - checks for testing purposes
marcinwrobel1986 Jul 16, 2021
02da36a
#377: - removed checks
marcinwrobel1986 Jul 16, 2021
6af8a6a
#377: - created aliases
marcinwrobel1986 Jul 16, 2021
135b19a
#377: - check if aliases work
marcinwrobel1986 Jul 16, 2021
06ba32b
#377: - trying other way
marcinwrobel1986 Jul 16, 2021
6a51fe7
#377: - fixed if
marcinwrobel1986 Jul 16, 2021
adf2d2a
#377: - fixed if
marcinwrobel1986 Jul 16, 2021
7acbfbd
#377: - check for aliases
marcinwrobel1986 Jul 16, 2021
127601f
#377: - try alternatives
marcinwrobel1986 Jul 16, 2021
9a62a04
#377: - try alternatives
marcinwrobel1986 Jul 16, 2021
3e0b5bb
#377: - try alternatives
marcinwrobel1986 Jul 16, 2021
fd4040f
#377: - fix memory problem
marcinwrobel1986 Jul 16, 2021
2a6bd9c
#377: - removed unnecessary options
marcinwrobel1986 Jul 16, 2021
fdaf159
#377: - changing order of the tests
marcinwrobel1986 Jul 16, 2021
9429c53
Add 'generator' option (not used yet)
bartlettroscoe Jul 16, 2021
895d469
Disable submits to CDash
bartlettroscoe Jul 16, 2021
63dc18a
Merge remote-tracking branch 'github/master' into 377-github-actions-ci
bartlettroscoe Jul 19, 2021
2aa9ffb
Add GitHub Actions-specific driver (#363)
bartlettroscoe Jul 19, 2021
5656f5a
Switch over to use run_github_actions_ctest_driver.sh (#363)
bartlettroscoe Jul 19, 2021
a33fc8a
Change max-parallel from 1 to 4 (#363)
bartlettroscoe Jul 19, 2021
8619153
No more hello_world.yml (#363)
bartlettroscoe Jul 19, 2021
fd7e45a
Fix path to run run_github_actions_ctest_driver.sh (#363)
bartlettroscoe Jul 19, 2021
c76f708
Fix misspelling of 'compiler' (#363)
bartlettroscoe Jul 19, 2021
4f57dc6
Property disable set --fortran-compiler-and-ver (#363)
bartlettroscoe Jul 19, 2021
8c5fe4e
Set 'fail-fast' to false (#363)
bartlettroscoe Jul 19, 2021
fa559e3
Allow --fortran-compiler-and-ver with no val, improve cmndline checki…
bartlettroscoe Jul 19, 2021
091a21d
Don't test build of docs for now (#363)
bartlettroscoe Jul 19, 2021
70de392
Rearrange options in matrix to match order in CTEST_BUILD_NAME (#363)
bartlettroscoe Jul 19, 2021
5ff5d9e
Make all builds use makefiles for now (#363)
bartlettroscoe Jul 19, 2021
f72490d
Set TriBITS_SHOW_TEST_START_END_DATE_TIME=ON (#363)
bartlettroscoe Jul 20, 2021
d2ddbaa
Adjust for MixedLang disable with no Fortran (#363)
bartlettroscoe Jul 20, 2021
1f397e0
Disable a bunch of tests that fail if there is no Fortran (#363)
bartlettroscoe Jul 20, 2021
d01b667
Make WORLD_READABLE=TRUE set same perms as GROUP_WRITABLE (#314, #363)
bartlettroscoe Jul 20, 2021
aae3bed
Adjust for different CMake 3.21 error output (#363)
bartlettroscoe Jul 20, 2021
65ee4e6
Adjust for different number of install errors reported by CMake 3.21 …
bartlettroscoe Jul 20, 2021
36af217
Adjust for move of rules.ninja in CMake 3.18 (#363)
bartlettroscoe Jul 20, 2021
3024a80
Update min version of CMake from 2.6 to 2.17 of old Fortran name mana…
bartlettroscoe Jul 20, 2021
87aa1d2
Merge remote-tracking branch 'rab-github/363-fix-ci-tests' into 377-g…
bartlettroscoe Jul 20, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/tribits_testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: TriBITS Testing

# Controls when the action will run.
# Triggers the workflow on push or pull request
# for the master and develop branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
strategy:
max-parallel: 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcinwrobel1986, just curious, but why is max-parallel set to just 1? Why not run all of these jobs at the same time? Why not let them run all at the same time? From looking at:

it looks like it can be as high as 20 for a free plan.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bartlettroscoe I set it to one, as I was getting strange cancellation of jobs E.g. when installing ubuntu packages. Once you are sure all jobs are succeded with 1 job at the time, please feel free to change it and check if there is no errors. I think it has something to do with resources. It could be as high as 20 parallel jobs, but if the resources are limited (CPU, RAM) it will not be working correctly, but I would give it a try anyway, but after making sure all jobs are passing.

matrix:
config:
- { os: ubuntu-latest, cc: gcc-8, cxx: g++-8, fc: gfortran-8, python: "2.7", cmake: "3.17.0", generator: "makefiles" }
- { os: ubuntu-latest, cc: gcc-10, cxx: g++-10, fc: gfortran-10, python: "3.8", cmake: "3.17.0", generator: "makefiles" }
- { os: ubuntu-latest, cc: gcc-11, cxx: g++-11, python: "3.8", cmake: "3.17.0", generator: "ninja" } # No Fortran
- { os: ubuntu-latest, cc: gcc-9, cxx: g++-9, fc: gfortran-9, python: "3.8", cmake: "3.21.0", generator: "ninja" }

runs-on: ${{ matrix.config.os }}

steps:
- uses: actions/checkout@v2

- name: Update OS
run: |
sudo apt-get update -y
- name: Install CMake
run: |
wget -O cmake.sh https://github.com/Kitware/CMake/releases/download/v${{ matrix.config.cmake }}/cmake-${{ matrix.config.cmake }}-Linux-x86_64.sh
sudo sh cmake.sh --skip-license --exclude-subdir --prefix=/usr/local/
- name: Install packages
run: |
sudo apt-get install -y ${{ matrix.config.cc }} ${{ matrix.config.cxx }} ${{ matrix.config.fc }}
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/${{ matrix.config.cc }} 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/${{ matrix.config.cxx }} 10
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/${{ matrix.config.fc }} 10
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 20
sudo update-alternatives --set cc /usr/bin/gcc
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 20
sudo update-alternatives --set c++ /usr/bin/g++
sudo update-alternatives --install /usr/bin/fortrann fortrann /usr/bin/gfortran 20
sudo update-alternatives --set fortrann /usr/bin/gfortran
sudo apt-get -y install valgrind
sudo apt-get -y install ninja-build
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.config.python }}
- name: Version checks
run: |
echo "Checking Cmake path and version"
which cmake
cmake --version
echo "Checking gcc path and version"
which ${{ matrix.config.cc }}
${{ matrix.config.cc }} --version
echo "Checking g++ path and version"
which ${{ matrix.config.cxx }}
${{ matrix.config.cxx }} --version
if [ "${{ matrix.config.fc }}" = "" ]; then echo "No fortran compiler"; else echo "Checking gfortran path and version" && which ${{ matrix.config.fc }} && ${{ matrix.config.fc }} --version; fi
- name: Run script
run: |
cd ..
mkdir tribits-build
cd tribits-build
env CTEST_DO_SUBMIT=OFF ctest -V -S ../TriBITS/cmake/ctest/travisci/ctest_trusty_serial_debug.cmake