From 514975d1235f1ce52fb93b1c13f71a75b1aef824 Mon Sep 17 00:00:00 2001 From: krande Date: Sat, 11 Mar 2023 16:05:09 +0100 Subject: [PATCH] add a workflow to catches and restarts failed conda builds due to 143 errors. And minor cleanup of unused variables in conda meta.yaml --- .../ci-restart-failed-daily-conda-builds.yml | 33 +++++++++++++++++++ conda/meta.yaml | 4 +-- 2 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ci-restart-failed-daily-conda-builds.yml diff --git a/.github/workflows/ci-restart-failed-daily-conda-builds.yml b/.github/workflows/ci-restart-failed-daily-conda-builds.yml new file mode 100644 index 0000000000..b89a9c5078 --- /dev/null +++ b/.github/workflows/ci-restart-failed-daily-conda-builds.yml @@ -0,0 +1,33 @@ +name: Restart failed daily conda builds + +on: + workflow_run: + workflows: [ci-ifcopenshell-conda-daily] + types: + - completed + +env: + REPO_OWNER: IfcOpenShell + MY_WORKFLOW: ci-ifcopenshell-conda-daily + +jobs: + restart-failed-runs: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'failure' }} + steps: + - name: Check for failed runs + id: check-failed-runs + run: | + echo "Checking for failed runs..." + # Replace "my-workflow" with the name of your workflow + failed_runs=$(curl -s https://api.github.com/repos/${{ env.REPO_OWNER }}/REPO/actions/runs?status=completed&conclusion=failure&workflow_id=${{ env.MY_WORKFLOW }} | jq '. | map(select(.status.code == 143))') + echo "Found $(echo $failed_runs | jq length) failed runs" + - name: Restart failed runs + if: steps.check-failed-runs.outputs.failed_runs != null + run: | + echo "Restarting failed runs..." + for run_id in $(echo $failed_runs | jq -r '.[].id'); do + echo "Restarting run $run_id..." + curl -s -X POST https://api.github.com/repos/${{ env.REPO_OWNER }}/REPO/actions/runs/$run_id/rerun \ + -H "Accept: application/vnd.github+json" + done \ No newline at end of file diff --git a/conda/meta.yaml b/conda/meta.yaml index b020bd23e5..befa7b6c54 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -1,8 +1,6 @@ {% set name = "ifcopenshell" %} {% set version = "0.7.0" %} -{% set occt_version = "7.6.2" %} -{% set cgal_cpp_version = "5.3" %} -{% set hdf5_version = "1.12.1" %} + package: name: {{ name }}