-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
78 additions
and
0 deletions.
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,78 @@ | ||
name: Compile TDEP and test binaries | ||
run-name: ${{ github.actor }} is trying to compile and run TDEP | ||
on: | ||
push: | ||
paths: | ||
- .github/workflows/ci_simple_compilation_and_test.yml | ||
- src/** | ||
workflow_dispatch: | ||
|
||
env: | ||
ARTIFACTS: tdep-test-artifacts | ||
N_THREADS: 4 | ||
|
||
jobs: | ||
Checkout-TDEP: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- name: Check out TDEP code | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: tdep-developers/tdep | ||
ref: fk_github_ci | ||
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | ||
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | ||
- name: Install packages required for building TDEP | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
gfortran \ | ||
libblas-dev \ | ||
liblapack-dev \ | ||
libhdf5-dev \ | ||
libhdf5-serial-dev \ | ||
libhdf5-openmpi-dev \ | ||
openmpi-bin \ | ||
libopenmpi-dev \ | ||
libfftw3-dev \ | ||
libscalapack-openmpi-dev | ||
- name: compile TDEP with debug flags | ||
id: compile_debug | ||
run: | | ||
cd ${{ github.workspace }} | ||
cp .github/important_settings.x86_64 important_settings | ||
cat .github/important_settings.fastcompile >> important_settings | ||
cat .github/important_settings.x86_64_debugflags >> important_settings | ||
bash build_things.sh --nthreads_make ${{ env.N_THREADS }} | ||
- name: compile TDEP production | ||
if: steps.compile_debug.outcome == 'success' | ||
id: compile_production | ||
run: | | ||
cd ${{ github.workspace }} | ||
cp .github/important_settings.x86_64 important_settings | ||
bash build_things.sh --nthreads_make ${{ env.N_THREADS }} | ||
- name: Create testfiles | ||
id: testfiles | ||
if: steps.compile_production.outcome == 'success' | ||
run: | | ||
cd ${{ github.workspace }}/tests | ||
make | ||
- name: Check tests | ||
id: test | ||
if: steps.testfiles.outcome == 'success' | ||
run: | | ||
cd ${{ github.workspace }}/tests | ||
pip install -r requirements.txt | ||
make test || exit 1 | ||
- name: Upload results | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: ${{ env.ARTIFACTS }} | ||
path: | | ||
${{ github.workspace }}/bin/ | ||
${{ github.workspace }}/build/ | ||
${{ github.workspace }}/tests/ | ||
${{ github.workspace }}/bashrc_tdep | ||
retention-days: 7 |