diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2019-12-25 09:06:48 +0100 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2019-12-25 00:06:48 -0800 |
commit | 2aa8132afd4326684626d2f0043e7006801f9e34 (patch) | |
tree | 66733a9b14a0c6f3da721b2d8e9d80f9b6efddf3 /.github/workflows | |
parent | 61b4ad18374756a261ccd6baccb60990fe04da21 (diff) | |
download | spack-2aa8132afd4326684626d2f0043e7006801f9e34.tar.gz spack-2aa8132afd4326684626d2f0043e7006801f9e34.tar.bz2 spack-2aa8132afd4326684626d2f0043e7006801f9e34.tar.xz spack-2aa8132afd4326684626d2f0043e7006801f9e34.zip |
Migrate build tests from Travis to Github Actions (#13967)
This PR moves build smoke tests from TravisCI and migrates them to Github Actions. The result is that build tests are performed in parallel with unit tests and they don't hog additional resources on Travis. The workflow will not run if a PR only changes packages in the built-in repository, but will always run on pushes to develop or master.
* Removed build tests from Travis and passed them to Github Actions
* Store ~/.ccache in Github Actions cache
* Add filters on paths and make sure this workflow don't run
* Use paths-ignore and exclude only files in the built-in repo
* Added a badge to README.md
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/build_tests_linux.yaml | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/.github/workflows/build_tests_linux.yaml b/.github/workflows/build_tests_linux.yaml new file mode 100644 index 0000000000..15aaa19f06 --- /dev/null +++ b/.github/workflows/build_tests_linux.yaml @@ -0,0 +1,57 @@ +name: Build Tests Linux + +on: + push: + branches: + - master + - develop + pull_request: + branches: + - master + - develop + paths-ignore: + # Don't run if we only modified packages in the built-in repository + - 'var/spack/repos/builtin/**' + - '!var/spack/repos/builtin/packages/lz4/**' + - '!var/spack/repos/builtin/packages/mpich/**' + - '!var/spack/repos/builtin/packages/tut/**' + - '!var/spack/repos/builtin/packages/py-setuptools/**' + - '!var/spack/repos/builtin/packages/openjpeg/**' + - '!var/spack/repos/builtin/packages/r-rcpp/**' + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + package: [lz4, mpich, tut, py-setuptools, openjpeg, r-rcpp] + steps: + - uses: actions/checkout@v1 + - name: Cache ccache's store + uses: actions/cache@v1 + with: + path: ~/.ccache + key: ccache-build-${{ matrix.package }} + restore-keys: | + ccache-build-${{ matrix.package }} + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install System Packages + run: | + sudo apt-get -yqq install ccache gfortran perl perl-base r-base r-base-core r-base-dev findutils openssl libssl-dev libpciaccess-dev + R --version + perl --version + - name: Copy Configuration + run: | + ccache -M 300M && ccache -z + # Set up external deps for build tests, b/c they take too long to compile + cp share/spack/qa/configuration/*.yaml etc/spack/ + - name: Run the build test + run: | + . share/spack/setup-env.sh + SPEC=${{ matrix.package }} share/spack/qa/run-build-tests + ccache -s |