diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..623055c0 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +version: 2 +updates: + - package-ecosystem: pip + directory: "/" + open-pull-requests-limit: 1 + schedule: + interval: daily + labels: + - automerge + - package-ecosystem: github-actions + directory: "/" + open-pull-requests-limit: 1 + schedule: + interval: daily + labels: + - automerge diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 22085103..ba95066a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,27 +14,29 @@ concurrency: env: NPROC: '2' # Number of Julia processes to run the notebooks PYTHON_VER: '3.11' + JULIA_CPU_TARGET: 'generic;haswell,clone_all' + JULIA_NUM_THREADS: 'auto' + JULIA_CONDAPKG_BACKEND: 'Null' + JULIA_CI: 'true' + GKSwstype: '100' jobs: execute: runs-on: ubuntu-latest - container: - image: julia:1.9.3 - env: - JULIA_CPU_TARGET: 'generic;haswell,clone_all' - JULIA_NUM_THREADS: auto - JULIA_CONDAPKG_BACKEND: 'Null' - JULIA_CI: 'true' - GKSwstype: '100' # Null GR backend for Plots.jl steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Setup Python - uses: actions/setup-python@v4 + - name: Read Julia version + uses: SebRollen/toml-action@v1.0.2 + id: read_toml with: - python-version: ${{ env.PYTHON_VER }} - - name: Install Python deps - run: python -m pip install --no-cache-dir -r requirements.txt + file: 'Manifest.toml' + field: 'julia_version' + - name: Install Julia using jill.sh + run: | + wget -O /tmp/jill.sh https://raw.githubusercontent.com/abelsiqueira/jill/main/jill.sh + bash /tmp/jill.sh --version ${{ steps.read_toml.outputs.value }} -y + echo "$HOME/.local/bin" >> $GITHUB_PATH - name: Cache Julia deps uses: actions/cache@v3 with: @@ -43,16 +45,24 @@ jobs: ~/.julia/compiled ~/.julia/packages ~/.julia/environments - key: ${{ runner.os }}-juliacontainer-${{ hashFiles('src/**','Project.toml', 'Manifest.toml')}} + key: ${{ runner.os }}-jill-${{ hashFiles('src/**','Project.toml', 'Manifest.toml')}} restore-keys: | - ${{ runner.os }}-juliacontainer- + ${{ runner.os }}-jill- + - name: Setup Python + uses: actions/setup-python@v4 + id: python3 + with: + python-version: ${{ env.PYTHON_VER }} + cache: 'pip' + - name: Install Python deps + run: python -m pip install -r requirements.txt - name: Install Julia deps env: - PYTHON: ${{ env.pythonLocation }}/python - JULIA_PYTHONCALL_EXE: ${{ env.pythonLocation }}/python + PYTHON: ${{ steps.python3.outputs.python-path }} + JULIA_PYTHONCALL_EXE: ${{ steps.python3.outputs.python-path }} run: | julia --color=yes -e 'using Pkg; Pkg.add(["PrettyTables", "Literate"])' - julia --project=@. --color=yes -e 'using Pkg; Pkg.activate("."); Pkg.instantiate(); Pkg.gc()' + julia --project=@. --color=yes -e 'using Pkg; Pkg.instantiate(); Pkg.gc()' - name: Run program env: JULIA_PROJECT: '@.' @@ -67,9 +77,6 @@ jobs: render: needs: execute runs-on: ubuntu-latest - # store success output flag for the ci job - outputs: - success: ${{ steps.setoutput.outputs.success }} steps: - name: Checkout uses: actions/checkout@v4 @@ -103,18 +110,14 @@ jobs: run: echo "success=true" >> $GITHUB_OUTPUT # CI conclusion for GitHub status check - # https://brunoscheufler.com/blog/2022-04-09-the-required-github-status-check-that-wasnt + # Adaped from https://brunoscheufler.com/blog/2022-04-09-the-required-github-status-check-that-wasnt CI: needs: render if: always() runs-on: ubuntu-latest steps: - # pass step only when output of previous jupyter-book job is set - # in case at least one of the execution fails, jupyter-book is skipped - # and the output will not be set, which will then cause the ci job to fail - run: | - passed="${{ needs.render.outputs.success }}" - if [[ $passed == "true" ]]; then + if [[ ${{ needs.render.result }} == "success" ]]; then echo "Tests passed" exit 0 else diff --git a/.github/workflows/update-manifest.yml b/.github/workflows/update-manifest.yml index da72fdd9..45e51a62 100644 --- a/.github/workflows/update-manifest.yml +++ b/.github/workflows/update-manifest.yml @@ -16,7 +16,6 @@ concurrency: env: APP_ID: '189113' # https://github.com/apps/wen-wei-s-pr-bot - JULIA_PKG_PRECOMPILE_AUTO: '0' jobs: update-manifest: @@ -30,6 +29,8 @@ jobs: - name: Setup Julia uses: julia-actions/setup-julia@v1 - name: Update Julia dependencies + env: + JULIA_PKG_PRECOMPILE_AUTO: '0' run: julia --color=yes --project=@. -e 'import Pkg; Pkg.update()' # Authenticate with a custom GitHub APP # https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens diff --git a/renovate.json b/renovate.json deleted file mode 100644 index 639b62b9..00000000 --- a/renovate.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": [ - "config:recommended", - ":automergeMajor" - ], - "git-submodules": { - "enabled": true - } -}