diff --git a/.github/workflows/ci-examples.yml b/.github/workflows/ci-examples.yml index 8179aab1..06dd3f8f 100644 --- a/.github/workflows/ci-examples.yml +++ b/.github/workflows/ci-examples.yml @@ -68,7 +68,7 @@ jobs: python3 -m pip install -U pip python3 -m pip install "matplotlib<3.9" seiscm colorcet echo "JULIA_PYTHONCALL_EXE=$(which python3)" >> $GITHUB_ENV - echo "JULIA_CONDAPKG_BACKEND=\"Null\"" >> $GITHUB_ENV + echo 'JULIA_CONDAPKG_BACKEND="Null"' >> $GITHUB_ENV echo "PYTHON=$(which python3)" >> $GITHUB_ENV echo "PYCALL_JL_RUNTIME_PYTHON=$(which python3)" >> $GITHUB_ENV diff --git a/.github/workflows/ci-op.yml b/.github/workflows/ci-op.yml index db4a82c3..47af8545 100644 --- a/.github/workflows/ci-op.yml +++ b/.github/workflows/ci-op.yml @@ -101,7 +101,7 @@ jobs: echo "PYTHON=$(which python3)" >> $GITHUB_ENV echo "PYCALL_JL_RUNTIME_PYTHON=$(which python3)" >> $GITHUB_ENV echo "JULIA_PYTHONCALL_EXE=$(which python3)" >> $GITHUB_ENV - echo "JULIA_CONDAPKG_BACKEND=\"Null\"" >> $GITHUB_ENV + echo 'JULIA_CONDAPKG_BACKEND="Null"' >> $GITHUB_ENV - name: Build JUDI uses: julia-actions/julia-buildpkg@latest diff --git a/.github/workflows/deploy_doc.yaml b/.github/workflows/deploy_doc.yaml index 49a57587..6a3ed92c 100644 --- a/.github/workflows/deploy_doc.yaml +++ b/.github/workflows/deploy_doc.yaml @@ -33,7 +33,7 @@ jobs: echo "PYTHON=$(which python3)" >> $GITHUB_ENV echo "PYCALL_JL_RUNTIME_PYTHON=$(which python3)" >> $GITHUB_ENV echo "JULIA_PYTHONCALL_EXE=$(which python3)" >> $GITHUB_ENV - echo "JULIA_CONDAPKG_BACKEND=\"Null\"" >> $GITHUB_ENV + echo 'JULIA_CONDAPKG_BACKEND="Null"' >> $GITHUB_ENV - name: Build JUDI uses: julia-actions/julia-buildpkg@latest diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml deleted file mode 100644 index 02999808..00000000 --- a/.github/workflows/docker-publish.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: Publish docker image - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -on: - release: - types: [published] - push: - branches: - - master # Push events on master branch - -jobs: - deploy-judi-image: - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - version: ['1.6', '1.7', '1.8', '1.9', '1.10'] - - steps: - - name: Check event name - run: echo ${{ github.event_name }} - - - name: Checkout JUDI - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1.0.2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1.1.2 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: JUDI development image - uses: docker/build-push-action@v2.4.0 - with: - context: . - file: ./docker/Dockerfile.JUDI - push: true - network: host - build-args: JVER=${{ matrix.version }} - tags: mloubout/judi:${{ matrix.version }}-dev - - - name: JUDI release image - if: github.event_name == 'release' - uses: docker/build-push-action@v2.4.0 - with: - context: . - file: ./docker/Dockerfile.JUDI - push: true - network: host - build-args: JVER=${{ matrix.version }} - tags: | - mloubout/judi:${{ matrix.version }}-latest - mloubout/judi:${{ matrix.version }}-${{ github.event.release.tag_name }} - - test-judi-image: - needs: deploy-judi-image - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - version: ['1.6', '1.7', '1.8', '1.9', '1.10'] - - steps: - - name: Run simple test - run: | - docker pull 'mloubout/judi:${{ matrix.version }}-dev' - docker run --rm --name testrun 'mloubout/judi:${{ matrix.version }}-dev' julia -e 'using Pkg;ENV["GROUP"]="BASICS";Pkg.test("JUDI")' - # NOTE: Suitable for the time being but will need to modify when we switch runners - - name: Clean - run: | - docker system prune -a -f \ No newline at end of file diff --git a/Project.toml b/Project.toml index 551fcde9..745d35b7 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "JUDI" uuid = "f3b833dc-6b2e-5b9c-b940-873ed6319979" authors = ["Philipp Witte, Mathias Louboutin"] -version = "4.0.0" +version = "4.0.1" [deps] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" diff --git a/deps/build.jl b/deps/build.jl index 7c1a2f72..b650ea1f 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -5,7 +5,15 @@ struct DevitoException <: Exception msg::String end -pyexe = PythonCall.python_executable_path() +if string(get(ENV, "JULIA_CONDAPKG_BACKEND", "conda")) == "Null" + pyexe = PythonCall.python_executable_path() +else + @info "Using $(get(ENV, "JULIA_CONDAPKG_BACKEND", "conda")) as the CondaPkg backend" + pyexe = PythonCall.C.CondaPkg.withenv() do + condapy = PythonCall.C.CondaPkg.which("python") + return condapy + end +end pk = try pyimport("pkg_resources")