parallelwindfarms / cylinder

Incompressible flow past cylinder: https://parallelwindfarms.github.io/cylinder/
Apache License 2.0
0 stars 0 forks source link

Cannot enable OpenFOAM in GitHub actions #16

Closed PabRod closed 2 years ago

PabRod commented 2 years ago

Problem

The step of enabling OpenFOAM is failing. The file /usr/lib/openfoam/openfoam2106/etc/bashrc is present and looks good. But when trying to execute it, we get an obscure message:

Error: Process completed with exit code 1.

I've tried chmod +x, but it is not allowed.

Possible solution

Why not go back to the containerized version of OpenFOAM?

on: [push]

jobs:
  openfoam_job:
    runs-on: ubuntu-latest
    container: openfoamplus/of_v1906_centos73 # <------
    name: A job to test OpenFOAM
    steps:
jhidding commented 2 years ago

Then we're back to the problem that Centos has antient packages. Maybe the command is failing because it is executed using sh instead of bash? (see https://github.community/t/declaring-a-default-shell-and-environment-variables-across-all-steps-in-a-job-github-actions/16228/2 on howto change that)

PabRod commented 2 years ago

I've tried that. But still fails.

PabRod commented 2 years ago

Finally we solved it the hacky way:

    - name: Run tests
      id: run-tests
      run: |
        set +o pipefail
        source /usr/lib/openfoam/openfoam2106/etc/bashrc
        poetry run pytest
      shell: bash