Skip to content

Commit

Permalink
debug action
Browse files Browse the repository at this point in the history
  • Loading branch information
lobis committed Dec 2, 2023
1 parent 1037bd2 commit 08eaa0a
Showing 1 changed file with 6 additions and 47 deletions.
53 changes: 6 additions & 47 deletions .github/workflows/build-test-new.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,47 +19,27 @@ concurrency:
cancel-in-progress: true

jobs:
build-test:
timeout-minutes: 30
build-geant4:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest]
platform: [ubuntu-latest]
geant4-version:
- 11.1.3
python-version:
- "3.9"
- "3.10"
- "3.11"

runs-on: ${{ matrix.platform }}
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install additional dependencies (ubuntu)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y build-essential ninja-build git curl libexpat-dev libxerces-c-dev
pip install cmake
- name: Install additional dependencies (macos)
if: matrix.platform == 'macos-latest'
run: |
# TODO
mamba env list
mamba install -c conda-forge zlib
mamba list
- name: Check Cache
id: cache
uses: actions/cache@v2
Expand All @@ -73,14 +53,14 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: |
git clone https://github.com/Geant4/geant4.git geant4 --depth 1 --branch v${{ matrix.geant4-version }}
cmake -G Ninja -B geant4-build -S geant4
cmake -G Ninja -B geant4/build -S geant4
-DCMAKE_INSTALL_PREFIX=geant4-install -DCMAKE_CXX_STANDARD=$CMAKE_CXX_STANDARD -DCMAKE_BUILD_TYPE=Release
-DGEANT4_USE_GDML=ON
-DGEANT4_INSTALL_EXAMPLES=OFF
-DGEANT4_INSTALL_DATA=OFF
-DGEANT4_BUILD_TLS_MODEL=global-dynamic
cmake --build /tmp/geant4/build -j$(nproc) --target install
rm -rf geant4 geant4-build
cmake --build geant4/build -j$(nproc) --target install
rm -rf geant4
- name: Cache Geant4 Installation
if: steps.cache.outputs.cache-hit != 'true'
Expand All @@ -90,24 +70,3 @@ jobs:
key: geant4-${{ matrix.geant4-version }}-${{ matrix.platform }}
restore-keys: |
geant4-${{ matrix.geant4-version }}-${{ matrix.platform }}
- name: Install the package
run: pip install .[test]

- name: Check imports
run: |
source geant4-install/bin/geant4.sh
python -c "import geant4_python_application; geant4_python_application.Application()"
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if:
${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled
}}
with:
limit-access-to-actor: false

- name: Run tests
run: |
source geant4-install/bin/geant4.sh
python -m pytest -vv tests --reruns 3 --reruns-delay 30 --only-rerun "(?i)http|timeout|connection|socket|resolve"

0 comments on commit 08eaa0a

Please sign in to comment.