From ca630ec5ca5b35b7d465f5cd2eb65a7c4f3d7f70 Mon Sep 17 00:00:00 2001 From: "Miriam K. Wolff" Date: Thu, 11 Sep 2025 14:01:51 +0200 Subject: [PATCH 1/5] Workflow fixes.. --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69233c4..908d6f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI Workflow -# Trigger the workflow when pushing to main (includes PR merges) or on PR events +# Trigger on PR events and direct pushes to main (but not PR merges) on: push: branches: @@ -47,7 +47,8 @@ jobs: pytest - name: Commit and push the generated .dylib file - if: github.ref == 'refs/heads/main' + # Skip if this is a PR merge (indicated by commit message containing "Merge pull request") + if: github.event_name == 'pull_request' || !contains(github.event.head_commit.message, 'Merge pull request') run: | git config --local user.name "GitHub Action" git config --local user.email "action@github.com" From 880a26d3487f466f0900b1afb8476939bf95085f Mon Sep 17 00:00:00 2001 From: "Miriam K. Wolff" Date: Thu, 11 Sep 2025 14:11:39 +0200 Subject: [PATCH 2/5] Reverted changes --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 908d6f9..b57e320 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,8 +52,6 @@ jobs: run: | git config --local user.name "GitHub Action" git config --local user.email "action@github.com" - git fetch origin - git pull origin ${{ github.ref_name }} --rebase git add ./loop_to_python_api/libLoopAlgorithmToPython.dylib git commit -m "Add generated libLoopAlgorithmToPython.dylib" || echo "No changes to commit" git push origin HEAD:${{ github.ref_name }} From 7e3e36b399de691914b6dfbd9404a6864e84400f Mon Sep 17 00:00:00 2001 From: "Miriam K. Wolff" Date: Thu, 11 Sep 2025 14:17:33 +0200 Subject: [PATCH 3/5] fixed CI for PRs --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b57e320..328a41c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,5 +54,9 @@ jobs: git config --local user.email "action@github.com" git add ./loop_to_python_api/libLoopAlgorithmToPython.dylib git commit -m "Add generated libLoopAlgorithmToPython.dylib" || echo "No changes to commit" - git push origin HEAD:${{ github.ref_name }} + if [ "${{ github.event_name }}" = "pull_request" ]; then + git push origin HEAD:${{ github.event.pull_request.head.ref }} + else + git push origin HEAD:${{ github.ref_name }} + fi From 7f71fae3176954f5712ce52fba6ae4efbe3b5854 Mon Sep 17 00:00:00 2001 From: "Miriam K. Wolff" Date: Thu, 11 Sep 2025 14:21:39 +0200 Subject: [PATCH 4/5] fixed CI for PRs --- .github/workflows/ci.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 328a41c..428f228 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,11 +52,22 @@ jobs: run: | git config --local user.name "GitHub Action" git config --local user.email "action@github.com" - git add ./loop_to_python_api/libLoopAlgorithmToPython.dylib - git commit -m "Add generated libLoopAlgorithmToPython.dylib" || echo "No changes to commit" + + # Determine target branch if [ "${{ github.event_name }}" = "pull_request" ]; then - git push origin HEAD:${{ github.event.pull_request.head.ref }} + TARGET_BRANCH="${{ github.event.pull_request.head.ref }}" else - git push origin HEAD:${{ github.ref_name }} + TARGET_BRANCH="${{ github.ref_name }}" fi + + # Fetch and checkout the target branch + git fetch origin + git checkout -B $TARGET_BRANCH origin/$TARGET_BRANCH + + # Add and commit the .dylib file + git add ./loop_to_python_api/libLoopAlgorithmToPython.dylib + git commit -m "Add generated libLoopAlgorithmToPython.dylib" || echo "No changes to commit" + + # Push to the target branch + git push origin $TARGET_BRANCH From 0e5c59da0c8a56fb6267b50c2f00708cfd4da73e Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 11 Sep 2025 12:23:03 +0000 Subject: [PATCH 5/5] Add generated libLoopAlgorithmToPython.dylib --- .../libLoopAlgorithmToPython.dylib | Bin 1198880 -> 1198880 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/loop_to_python_api/libLoopAlgorithmToPython.dylib b/loop_to_python_api/libLoopAlgorithmToPython.dylib index 8b75710b09f6d65ca9503cb6ef1a1987b87a3233..274a75589a6e98f20f6964f28558f4c37fd0a7f1 100755 GIT binary patch delta 1541 zcmXYtc{o&i7{~97m^p(nbCRqxV{92~DBD;Q=|PrC_Th?9Ms#moG|EychKDi=Whqi> zTuT!&T$HWoPKacgd2GogJBjW&bMGIY=X{>``~H5v_dSIJ z1d`OmAt$3p?cfTs6U~$mHus}JUFSE7A7p) z8DJC+$X@^~d9tGNvhaCNWv`&8}fo|Z^~k(y}ksx_ITD3r3wH+$gG@l4DX;@391XjfyH(oH0nUMitRJ z{RuG+cu_I!c!o;w3PyBq+IeE_s-JW+K4QkD;00lhL!0{6)12v8grC3^b;X)*;#i|< zgVf$9bUhi?urWxZ-7J0XynU?Jzc|F)g6QztGoLnU*ra?(BDnBnX(BtvS3_rEBXMA3=Udy!Bqz0vENYQugB=vI=;^93Xi>;_Bhgf%K z{Ik$&4#~)?>#PP-=s*1EHP*DFU-+bL8Ah#Mm1(XXm{bgO1HV72oVwFgr#s`~Ry_YY zBv_##F6H?R&2g-PvS*#w`&-7bBkGj&0X%n`_-mFRba&kcWsRFLvicXJUG2NEpLcZy z>};SU?L3`R<>e3FGDuDRjovq&9-}ON`*@L2_QQTULhf3hR`71bJC=_bG=>S5WFxf^ z*f?nYM91-M-+*MFVWk%lsXp94lvEe1Bp#G4rpAvrt_Ij|drzyG zCp3_<($knSsM+>Qo7ri+WyB(D%M7%p>2WCO?L*nMIe?YOn&;Cm*r~tG(%t(fN?w{N zDArx!hpC2fE&JWPi@!RZd`sNa_gjgdUJDx9eQ~2?nQMfwWIt*%nk5D$EFZVG3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