From 422fc13ff96db0bfb60b00ed3e29aead04a4239d Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 1 May 2024 12:21:44 +0100 Subject: [PATCH] CI: bump workflows, fix tests --- .github/workflows/conda_build_and_publish.yml | 20 +++++++++++-------- .github/workflows/docs_build_and_publish.yml | 7 ++++--- recipe/meta.yaml | 12 +++-------- 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/workflows/conda_build_and_publish.yml b/.github/workflows/conda_build_and_publish.yml index d6822fc..9ceb69d 100644 --- a/.github/workflows/conda_build_and_publish.yml +++ b/.github/workflows/conda_build_and_publish.yml @@ -1,5 +1,4 @@ -name: conda_build - +name: conda on: release: types: [published] @@ -9,19 +8,24 @@ on: - '**' pull_request: branches: [ master ] - jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha || github.ref }} # fix SHA + - name: install dependencies + run: | + # required for VTK + sudo apt-get update -qq + sudo apt-get install -yqq libosmesa6-dev - name: publish-to-conda - uses: paskino/conda-package-publish-action@v1.4.4 + uses: TomographicImaging/conda-package-publish-action@v2 with: - subDir: 'recipe' + subDir: recipe channels: '-c conda-forge -c ccpi -c paskino' AnacondaToken: ${{ secrets.ANACONDA_TOKEN }} publish: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') }} test_all: ${{(github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')) || (github.ref == 'refs/heads/master')}} - convert_win: false - convert_osx: false diff --git a/.github/workflows/docs_build_and_publish.yml b/.github/workflows/docs_build_and_publish.yml index a87205b..9b1291d 100644 --- a/.github/workflows/docs_build_and_publish.yml +++ b/.github/workflows/docs_build_and_publish.yml @@ -1,3 +1,4 @@ +name: docs on: release: types: [published] @@ -13,13 +14,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - uses: ammaraskar/sphinx-action@master with: docs-folder: "docs/" pre-build-command: python -m pip install --upgrade pip; pip install sphinx_rtd_theme # Create an artifact of the html output. - - uses: actions/upload-artifact@v1 + - uses: actions/upload-artifact@v4 with: name: DocumentationHTML path: docs/build/html/ @@ -30,7 +31,7 @@ jobs: if: github.ref == 'refs/heads/master' steps: - name: Download artifact of the html output. - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: DocumentationHTML path: docs/build/html/ diff --git a/recipe/meta.yaml b/recipe/meta.yaml index e0dbfed..400fb04 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -6,13 +6,11 @@ source: path: ../ build: - number: {{ GIT_DESCRIBE_NUMBER }} + number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} noarch: python preserve_egg_dir: False - entry_points: - idvc = idvc.idvc:main - missing_dso_whitelist: - /lib64/libc.so.6 # [linux] - /lib64/libm.so.6 # [linux] @@ -23,22 +21,18 @@ build: - C:\Windows\System32\msvcrt.dll # [win] - C:\Windows\System32\SHELL32.dll # [win] - test: source_files: - ./test - commands: - - python -c "import os; print ('TESTING IN THIS DIRECTORY' , os.getcwd())" + - python -c "import os; print('TESTING IN THIS DIRECTORY', os.getcwd())" - python -m unittest discover test - + requirements: - build: - python - numpy - typing_extensions # [py<=37] - run: - python - numpy