-
Notifications
You must be signed in to change notification settings - Fork 47
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
marcinwrobel1986
wants to merge
45
commits into
TriBITSPub:master
from
marcinwrobel1986:377-provide-feedback-on-TriBITS-package-dependencies-data-structures-CI
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 42c175a
#377: - added no fortran option
marcinwrobel1986 ad56911
#377: - run job only when push on master branch
marcinwrobel1986 2c1af51
#377: - attempt to try different variants
marcinwrobel1986 15959a7
#377: - added version checking
marcinwrobel1986 dabbcf8
#377: - try to get specific versions
marcinwrobel1986 3fabb91
#377: - separate removing and installation
marcinwrobel1986 3d15fef
#377: - checks for testing purposes
marcinwrobel1986 02da36a
#377: - removed checks
marcinwrobel1986 6af8a6a
#377: - created aliases
marcinwrobel1986 135b19a
#377: - check if aliases work
marcinwrobel1986 06ba32b
#377: - trying other way
marcinwrobel1986 6a51fe7
#377: - fixed if
marcinwrobel1986 adf2d2a
#377: - fixed if
marcinwrobel1986 7acbfbd
#377: - check for aliases
marcinwrobel1986 127601f
#377: - try alternatives
marcinwrobel1986 9a62a04
#377: - try alternatives
marcinwrobel1986 3e0b5bb
#377: - try alternatives
marcinwrobel1986 fd4040f
#377: - fix memory problem
marcinwrobel1986 2a6bd9c
#377: - removed unnecessary options
marcinwrobel1986 fdaf159
#377: - changing order of the tests
marcinwrobel1986 9429c53
Add 'generator' option (not used yet)
bartlettroscoe 895d469
Disable submits to CDash
bartlettroscoe 63dc18a
Merge remote-tracking branch 'github/master' into 377-github-actions-ci
bartlettroscoe 2aa9ffb
Add GitHub Actions-specific driver (#363)
bartlettroscoe 5656f5a
Switch over to use run_github_actions_ctest_driver.sh (#363)
bartlettroscoe a33fc8a
Change max-parallel from 1 to 4 (#363)
bartlettroscoe 8619153
No more hello_world.yml (#363)
bartlettroscoe fd7e45a
Fix path to run run_github_actions_ctest_driver.sh (#363)
bartlettroscoe c76f708
Fix misspelling of 'compiler' (#363)
bartlettroscoe 4f57dc6
Property disable set --fortran-compiler-and-ver (#363)
bartlettroscoe 8c5fe4e
Set 'fail-fast' to false (#363)
bartlettroscoe fa559e3
Allow --fortran-compiler-and-ver with no val, improve cmndline checki…
bartlettroscoe 091a21d
Don't test build of docs for now (#363)
bartlettroscoe 70de392
Rearrange options in matrix to match order in CTEST_BUILD_NAME (#363)
bartlettroscoe 5ff5d9e
Make all builds use makefiles for now (#363)
bartlettroscoe f72490d
Set TriBITS_SHOW_TEST_START_END_DATE_TIME=ON (#363)
bartlettroscoe d2ddbaa
Adjust for MixedLang disable with no Fortran (#363)
bartlettroscoe 1f397e0
Disable a bunch of tests that fail if there is no Fortran (#363)
bartlettroscoe d01b667
Make WORLD_READABLE=TRUE set same perms as GROUP_WRITABLE (#314, #363)
bartlettroscoe aae3bed
Adjust for different CMake 3.21 error output (#363)
bartlettroscoe 65ee4e6
Adjust for different number of install errors reported by CMake 3.21 …
bartlettroscoe 36af217
Adjust for move of rules.ninja in CMake 3.18 (#363)
bartlettroscoe 3024a80
Update min version of CMake from 2.6 to 2.17 of old Fortran name mana…
bartlettroscoe 87aa1d2
Merge remote-tracking branch 'rab-github/363-fix-ci-tests' into 377-g…
bartlettroscoe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
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 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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 just1
? 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.
There was a problem hiding this comment.
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.