pytest: Temporary Working Directory #554
Workflow file for this run
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
name: 🐧 Ubuntu | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.ref }}-${{ github.head_ref }}-linux | |
cancel-in-progress: true | |
jobs: | |
# Build and install libamrex as AMReX CMake project | |
gcc7: | |
name: [email protected] | |
runs-on: ubuntu-20.04 | |
env: | |
CC: gcc-7 | |
CXX: g++-7 | |
CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names -Wno-array-bounds" | |
if: github.event.pull_request.draft == false | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.9' | |
- name: Dependencies | |
run: .github/workflows/dependencies/gcc7.sh | |
- name: Build & Install | |
run: | | |
python3 -m pip install -U pip setuptools wheel pytest | |
AMREX_MPI=ON python3 -m pip install -v . | |
python3 -c "import amrex.space1d as amr; print(amr.__version__)" | |
python3 -c "import amrex.space2d as amr; print(amr.__version__)" | |
python3 -c "import amrex.space3d as amr; print(amr.__version__)" | |
- name: Unit tests | |
run: | | |
mpiexec -np 1 python3 -m pytest tests/ | |
gcc10: | |
name: [email protected] | |
runs-on: ubuntu-22.04 | |
env: {CXXFLAGS: "-Werror -Wno-error=deprecated-declarations -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"} | |
if: github.event.pull_request.draft == false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Dependencies | |
run: .github/workflows/dependencies/dependencies_gcc10.sh | |
- name: Build & Install | |
run: | | |
export CC=$(which gcc-10) | |
export CXX=$(which g++-10) | |
python3 -m pip install -U pip setuptools wheel | |
python3 -m pip install -U cmake | |
python3 -m pip install -U pytest mpi4py | |
cmake -S . -B build \ | |
-DCMAKE_BUILD_TYPE=Debug \ | |
-DCMAKE_VERBOSE_MAKEFILE=ON \ | |
-DBUILD_SHARED_LIBS=ON \ | |
-DAMReX_MPI=ON \ | |
-DAMReX_SPACEDIM="1;2;3" | |
cmake --build build --target pip_install -j 2 | |
- name: Unit tests | |
run: | | |
ctest --test-dir build --output-on-failure | |
- name: Unit tests as installed | |
run: | | |
sudo cp build/lib/libamrex_*.so /usr/lib/ | |
rm -rf build | |
python3 -m pytest tests | |
clang6: | |
name: [email protected] w/o MPI | |
runs-on: ubuntu-20.04 | |
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -fno-operator-names -Wno-pass-failed"} | |
if: github.event.pull_request.draft == false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Dependencies | |
run: .github/workflows/dependencies/dependencies_clang6.sh | |
- name: Build & Install | |
run: | | |
export CC=$(which clang-6.0) | |
export CXX=$(which clang++-6.0) | |
python3 -m pip install -U pip pytest | |
python3 -m pip install -v . | |
python3 -c "import amrex.space1d as amr; print(amr.__version__)" | |
python3 -c "import amrex.space2d as amr; print(amr.__version__)" | |
python3 -c "import amrex.space3d as amr; print(amr.__version__)" | |
- name: Unit tests | |
run: | | |
python3 -m pytest tests/ | |
clang14: | |
name: [email protected] w/ libc++ w/ MPI | |
runs-on: ubuntu-22.04 | |
env: | |
CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -fno-operator-names -Wno-pass-failed -stdlib=libc++" | |
LDFLAGS: "-fuse-ld=lld" | |
CXX: "clang++" | |
CC: "clang" | |
if: github.event.pull_request.draft == false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Dependencies | |
run: .github/workflows/dependencies/dependencies_clang14_libcpp.sh | |
- name: Build & Install | |
run: | | |
python3 -m pip install -U pip pytest | |
python3 -m pip install -v . | |
python3 -c "import amrex.space1d as amr; print(amr.__version__)" | |
python3 -c "import amrex.space2d as amr; print(amr.__version__)" | |
python3 -c "import amrex.space3d as amr; print(amr.__version__)" | |
- name: Unit tests | |
run: | | |
python3 -m pytest tests/ | |
nvcc11: | |
name: [email protected] [email protected] | |
runs-on: ubuntu-20.04 | |
env: {CXXFLAGS: "-fno-operator-names"} | |
if: github.event.pull_request.draft == false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Dependencies | |
run: .github/workflows/dependencies/dependencies_nvcc11.sh | |
- name: Build & Install | |
run: | | |
export PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH} | |
export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:${LD_LIBRARY_PATH} | |
which nvcc || echo "nvcc not in PATH!" | |
export CC=$(which gcc) | |
export CXX=$(which g++) | |
export CUDAHOSTCXX=$(which g++) | |
python3 -m pip install -U pip setuptools wheel | |
python3 -m pip install -U cmake | |
cmake -S . -B build \ | |
-DCMAKE_VERBOSE_MAKEFILE=ON \ | |
-DAMReX_GPU_BACKEND=CUDA \ | |
-DAMReX_SPACEDIM="1;2;3" \ | |
-DCMAKE_CUDA_STANDARD=17 \ | |
-DCMAKE_CXX_STANDARD=17 \ | |
-DAMReX_CUDA_ARCH=8.0 \ | |
-DAMReX_CUDA_ERROR_CROSS_EXECUTION_SPACE_CALL=ON \ | |
-DAMReX_CUDA_ERROR_CAPTURE_THIS=ON | |
cmake --build build --target pip_install -j 2 |