From 47582ed4b6b35a680a600d739ef7fdae3de4bf5e Mon Sep 17 00:00:00 2001 From: Anil Tuncel Date: Tue, 20 Feb 2024 17:37:55 +0100 Subject: [PATCH 1/7] separate build-wheels from publish --- .github/workflows/build-wheels.yml | 43 +++++++++++++++++++ .github/workflows/{build.yml => publish.yml} | 44 +++----------------- 2 files changed, 49 insertions(+), 38 deletions(-) create mode 100644 .github/workflows/build-wheels.yml rename .github/workflows/{build.yml => publish.yml} (68%) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml new file mode 100644 index 00000000..6fce2b8b --- /dev/null +++ b/.github/workflows/build-wheels.yml @@ -0,0 +1,43 @@ +name: Build Wheels + +on: + pull_request: {} + workflow_call: + +jobs: + build-wheels: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, macos-latest, windows-latest] + python: [cp39, cp310, cp311, cp312] + arch: [x86_64, amd64] + exclude: + - os: macos-latest + arch: amd64 + - os: ubuntu-22.04 + arch: amd64 + - os: windows-latest + arch: x86_64 + env: + CIBW_BUILD: ${{ matrix.python }}*${{ matrix.arch }} + CIBW_TEST_REQUIRES: pytest neo[neomatlabio]>=0.5.1 pytest-xdist>=3.3.1 + CIBW_TEST_COMMAND: pytest -sx -n auto {project}/tests + CIBW_SKIP: "*-musllinux_*" + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.9 # This might need to be dynamic based on the matrix + - name: Install cibuildwheel + run: pip install cibuildwheel + - name: Build wheels + run: cibuildwheel --output-dir wheelhouse + - uses: actions/upload-artifact@v4 + with: + name: wheels-${{ matrix.os }}-${{ matrix.python }}-${{ matrix.arch }} + path: ./wheelhouse/*.whl diff --git a/.github/workflows/build.yml b/.github/workflows/publish.yml similarity index 68% rename from .github/workflows/build.yml rename to .github/workflows/publish.yml index 5d8b0270..31400f74 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/publish.yml @@ -46,47 +46,15 @@ jobs: tag_name: ${{ env.TAG_NAME }} name: ${{ env.TAG_NAME }} generate_release_notes: true - + wheels: needs: [call-test-workflow, tag] - name: Build wheels for ${{ matrix.python }} ${{ matrix.os }} ${{ matrix.arch }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-22.04, macos-latest, windows-latest] - python: [cp38, cp39, cp310, cp311, cp312] - arch: [x86_64, amd64] - exclude: - - os: macos-latest - arch: amd64 - - os: ubuntu-22.04 - arch: amd64 - - os: windows-latest - arch: x86_64 + uses: BlueBrain/eFEL/.github/workflows/build-wheels.yml@master + with: + python-version: '3.9' + os: 'ubuntu-22.04' + arch: 'x86_64' - env: - CIBW_BUILD: ${{ matrix.python }}*${{ matrix.arch }} - CIBW_TEST_REQUIRES: pytest neo[neomatlabio]>=0.5.1 pytest-xdist>=3.3.1 - CIBW_TEST_COMMAND: pytest -sx -n auto {project}/tests - CIBW_SKIP: "*-musllinux_*" - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Python 3.9 - uses: actions/setup-python@v5 - with: - python-version: 3.9 - - name: Install cibuildwheel - run: pip install cibuildwheel - - name: Build wheels - run: cibuildwheel --output-dir wheelhouse - - uses: actions/upload-artifact@v4 - with: - name: wheels-${{ matrix.os }}-${{ matrix.python }}-${{ matrix.arch }} - path: ./wheelhouse/*.whl tarball: name: Build tarball From 27ded14d77dda85bdbb7a36f28d2cd311ac1ad5c Mon Sep 17 00:00:00 2001 From: Anil Tuncel Date: Tue, 20 Feb 2024 17:50:34 +0100 Subject: [PATCH 2/7] use relative path in workflow call --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 31400f74..50f0015c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -49,7 +49,7 @@ jobs: wheels: needs: [call-test-workflow, tag] - uses: BlueBrain/eFEL/.github/workflows/build-wheels.yml@master + uses: ./.github/workflows/build-wheels.yml@master with: python-version: '3.9' os: 'ubuntu-22.04' From f32e9873538da7741a6b04cd2b307420fa7e629c Mon Sep 17 00:00:00 2001 From: Anil Tuncel Date: Tue, 20 Feb 2024 17:54:02 +0100 Subject: [PATCH 3/7] remove local workflow call version specification --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 50f0015c..4bfd21fc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -49,7 +49,7 @@ jobs: wheels: needs: [call-test-workflow, tag] - uses: ./.github/workflows/build-wheels.yml@master + uses: ./.github/workflows/build-wheels.yml with: python-version: '3.9' os: 'ubuntu-22.04' From 158634f6674eee357fcb96c49f26410090779c52 Mon Sep 17 00:00:00 2001 From: Anil Tuncel Date: Tue, 20 Feb 2024 17:55:26 +0100 Subject: [PATCH 4/7] remove mirror-ebrains --- .github/workflows/mirror-ebrains.yml | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 .github/workflows/mirror-ebrains.yml diff --git a/.github/workflows/mirror-ebrains.yml b/.github/workflows/mirror-ebrains.yml deleted file mode 100644 index e7916fe2..00000000 --- a/.github/workflows/mirror-ebrains.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Mirror to Ebrains - -on: - push: - branches: [ master ] - -jobs: - to_ebrains: - runs-on: ubuntu-latest - steps: - - name: syncmaster - uses: wei/git-sync@v3 - with: - source_repo: "BlueBrain/eFEL" - source_branch: "master" - destination_repo: "https://ghpusher:${{ secrets.EBRAINS_GITLAB_ACCESS_TOKEN }}@gitlab.ebrains.eu/BlueBrain/efel.git" - destination_branch: "master" - - name: synctags - uses: wei/git-sync@v3 - with: - source_repo: "BlueBrain/eFEL" - source_branch: "refs/tags/*" - destination_repo: "https://ghpusher:${{ secrets.EBRAINS_GITLAB_ACCESS_TOKEN }}@gitlab.ebrains.eu/BlueBrain/efel.git" - destination_branch: "refs/tags/*" \ No newline at end of file From f0b95980cb3252159c24721074a692e40170b905 Mon Sep 17 00:00:00 2001 From: Anil Tuncel Date: Tue, 20 Feb 2024 17:56:46 +0100 Subject: [PATCH 5/7] remove python-version, os,arc in the local workflow call --- .github/workflows/publish.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4bfd21fc..329fb067 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -50,11 +50,6 @@ jobs: wheels: needs: [call-test-workflow, tag] uses: ./.github/workflows/build-wheels.yml - with: - python-version: '3.9' - os: 'ubuntu-22.04' - arch: 'x86_64' - tarball: name: Build tarball From cfb05581b82eaf711af22ca5e3bffb9be59cb304 Mon Sep 17 00:00:00 2001 From: Anil Tuncel Date: Tue, 20 Feb 2024 18:01:21 +0100 Subject: [PATCH 6/7] Revert "remove mirror-ebrains" This reverts commit 158634f6674eee357fcb96c49f26410090779c52. --- .github/workflows/mirror-ebrains.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/mirror-ebrains.yml diff --git a/.github/workflows/mirror-ebrains.yml b/.github/workflows/mirror-ebrains.yml new file mode 100644 index 00000000..e7916fe2 --- /dev/null +++ b/.github/workflows/mirror-ebrains.yml @@ -0,0 +1,24 @@ +name: Mirror to Ebrains + +on: + push: + branches: [ master ] + +jobs: + to_ebrains: + runs-on: ubuntu-latest + steps: + - name: syncmaster + uses: wei/git-sync@v3 + with: + source_repo: "BlueBrain/eFEL" + source_branch: "master" + destination_repo: "https://ghpusher:${{ secrets.EBRAINS_GITLAB_ACCESS_TOKEN }}@gitlab.ebrains.eu/BlueBrain/efel.git" + destination_branch: "master" + - name: synctags + uses: wei/git-sync@v3 + with: + source_repo: "BlueBrain/eFEL" + source_branch: "refs/tags/*" + destination_repo: "https://ghpusher:${{ secrets.EBRAINS_GITLAB_ACCESS_TOKEN }}@gitlab.ebrains.eu/BlueBrain/efel.git" + destination_branch: "refs/tags/*" \ No newline at end of file From 953137f19d01f80bb1f8df01484e1ef8b9985c53 Mon Sep 17 00:00:00 2001 From: Anil Tuncel Date: Wed, 21 Feb 2024 09:08:03 +0100 Subject: [PATCH 7/7] rename the name on the 1st line of publish.yml --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 329fb067..752c8427 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: Build +name: Publish on: push: