TST: remove wrong imports. #369
This file contains hidden or 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: pyGIMLi CI | |
| env: | |
| SOURCE_DIR: source | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| - release | |
| pull_request: | |
| branches: | |
| - dev | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| get-runner: | |
| name: Choose runner | |
| if: "!contains(github.event.head_commit.message, '[noci]')" | |
| runs-on: self-hosted | |
| outputs: | |
| RUNNER: ${{ runner.name }} | |
| steps: | |
| - run: echo "Selected runner = ${{ runner.name }}" | |
| pgcore: | |
| name: Building pgcore & bindings | |
| needs: get-runner | |
| runs-on: ${{needs.get-runner.outputs.RUNNER}} | |
| steps: | |
| - name: Getting pyGIMLi sources | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # checks out all branches and tags | |
| path: source | |
| - name: Cleaning old builds | |
| run: bash ./$SOURCE_DIR/.workflow.sh clean | |
| - name: Prepare build | |
| run: bash ./$SOURCE_DIR/.workflow.sh build_pre | |
| - name: Build libgimli | |
| run: bash ./$SOURCE_DIR/.workflow.sh build | |
| - name: Test bindings | |
| run: bash ./$SOURCE_DIR/.workflow.sh build_post | |
| tests: | |
| name: Running tests | |
| needs: [get-runner, pgcore] | |
| runs-on: ${{needs.get-runner.outputs.RUNNER}} | |
| env: | |
| OPENBLAS_CORETYPE: "ARMV8" # current bug in OpenBlas core detection | |
| steps: | |
| - name: Prepare tests | |
| run: bash ./$SOURCE_DIR/.workflow.sh test_pre | |
| - name: Run pg.test() | |
| run: bash ./$SOURCE_DIR/.workflow.sh test | |
| docs: | |
| name: Build website with examples | |
| needs: [get-runner, pgcore] | |
| runs-on: ${{needs.get-runner.outputs.RUNNER}} | |
| env: | |
| DISPLAY: ":99.0" | |
| PYVISTA_OFF_SCREEN: True | |
| OPENBLAS_CORETYPE: "ARMV8" # current bug in OpenBlas core detection | |
| steps: | |
| - name: Preparing doc build | |
| run: bash ./$SOURCE_DIR/.workflow.sh doc_pre | |
| - name: Running sphinx | |
| run: bash ./$SOURCE_DIR/.workflow.sh doc | |
| - name: Stage built website (release only) | |
| if: github.ref == 'refs/heads/release' | |
| run: | | |
| rm -rf _site | |
| mkdir _site | |
| cp -R build-py*/doc/_build/html/. _site/ | |
| - name: Deploy to pygimli.org via FTP (release only) | |
| if: github.ref == 'refs/heads/release' | |
| uses: SamKirkland/FTP-Deploy-Action@v4.3.5 | |
| with: | |
| server: ${{ secrets.FTP_URL }} | |
| username: ${{ secrets.FTP_USER }} | |
| password: ${{ secrets.FTP_PW }} | |
| local-dir: ./_site/ | |
| merging: | |
| name: Automerging | |
| needs: [get-runner,tests,docs] | |
| runs-on: ${{needs.get-runner.outputs.RUNNER}} | |
| if: github.ref == 'refs/heads/dev' # Only merge from dev | |
| steps: | |
| - name: Merge dev -> main (with rebase) | |
| working-directory: source | |
| run: | | |
| # Authorize with personal access token | |
| echo "config" | |
| git config --local user.email "actions@github.com" | |
| git config --local user.name "GitHub Actions" | |
| echo "remote" | |
| git remote set-url origin https://florian-wagner:${{ secrets.SECRET }}@github.com/gimli-org/pyGIMLi.git | |
| # Make sure to be in sync with dev on remote | |
| echo "dev status" | |
| git status | |
| echo "main status" | |
| git checkout main | |
| git status | |
| echo "merge" | |
| git merge dev --ff-only | |
| git push origin HEAD:main | |
| upload-html: | |
| name: Upload HTML to dev.pygimli.org | |
| runs-on: pgserver | |
| needs: [tests,docs] | |
| if: github.ref == 'refs/heads/dev' # Only merge from dev | |
| steps: | |
| - name: Uploading built html files | |
| run: bash ./$SOURCE_DIR/.workflow.sh doc_post |