From affbc2c5658d6462e6847d6f9ae06224dfe1c786 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Wed, 15 May 2024 13:52:49 -0700 Subject: [PATCH 01/35] Update cibuildwheel config to build py310 wheels --- scripts/build_wheels.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build_wheels.sh b/scripts/build_wheels.sh index 5e97d6b..55d8345 100755 --- a/scripts/build_wheels.sh +++ b/scripts/build_wheels.sh @@ -9,7 +9,7 @@ function realpath() { sdist_path="$(realpath "$1")" -python -m pip install build cibuildwheel==2.11.2 +python -m pip install build cibuildwheel==2.18.0 if [ "$(uname)" == "Linux" ]; then pip install auditwheel elif [ "$(uname)" == "Darwin" ]; then @@ -29,7 +29,7 @@ done export PIP_FIND_LINKS="$sdist_path" export CIBW_ENVIRONMENT_LINUX="PIP_FIND_LINKS=/host$PIP_FIND_LINKS" -export CIBW_BUILD="cp38-manylinux_x86_64 cp38-win_amd64 cp38-macosx_x86_64" +export CIBW_BUILD="cp310-manylinux_x86_64 cp310-win_amd64 cp310-macosx_x86_64" export CIBW_REPAIR_WHEEL_COMMAND="" for dist in $(ls); do package=$(cat $dist/PKG-INFO | grep '^Name: [a-zA-Z0-9-]\+$' | head -n 1 | cut -d' ' -f2) From 1329808a534b3de80be103c0d38bfdeea253bef2 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Wed, 15 May 2024 14:45:56 -0700 Subject: [PATCH 02/35] Add arm wheel targets --- scripts/build_wheels.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/build_wheels.sh b/scripts/build_wheels.sh index 55d8345..7bc6111 100755 --- a/scripts/build_wheels.sh +++ b/scripts/build_wheels.sh @@ -29,7 +29,13 @@ done export PIP_FIND_LINKS="$sdist_path" export CIBW_ENVIRONMENT_LINUX="PIP_FIND_LINKS=/host$PIP_FIND_LINKS" -export CIBW_BUILD="cp310-manylinux_x86_64 cp310-win_amd64 cp310-macosx_x86_64" +export CIBW_BUILD=" + cp310-manylinux_x86_64 + cp310-manylinux_aarch64 + cp310-win_amd64 + cp310-macosx_x86_64 + cp310-macosx_arm64 + " export CIBW_REPAIR_WHEEL_COMMAND="" for dist in $(ls); do package=$(cat $dist/PKG-INFO | grep '^Name: [a-zA-Z0-9-]\+$' | head -n 1 | cut -d' ' -f2) From 3bf40addd065eb335612b68e7f65651c05ea5eee Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 13:23:08 -0700 Subject: [PATCH 03/35] Convert release pipeline to github actions --- .github/workflows/angr-release.yml | 167 ++++++++++++++++++ {scripts => release-scripts}/build_wheels.sh | 0 {scripts => release-scripts}/bump_versions.sh | 2 +- .../checkout_repos.sh | 2 +- .../create_release_artifact.sh | 0 .../create_release_commits.sh | 0 {scripts => release-scripts}/create_sdist.sh | 1 + .../publish_release_commits.sh | 0 .../setup_venv_from_artifact.sh | 1 + {scripts => release-scripts}/vars.sh | 0 {scripts => release-scripts}/versiontool.py | 0 resources/jobs/release/build-wheels.yml | 33 ---- .../jobs/release/create-release-commits.yml | 44 ----- resources/jobs/release/publish-pypi.yml | 42 ----- .../jobs/release/publish-release-commits.yml | 31 ---- resources/jobs/release/setup-host.yml | 31 ---- .../jobs/release/setup-venv-from-artifact.yml | 14 -- resources/jobs/release/verify.yml | 38 ---- resources/release.yml | 47 ----- scripts/setup_git.sh | 12 -- 20 files changed, 171 insertions(+), 294 deletions(-) create mode 100644 .github/workflows/angr-release.yml rename {scripts => release-scripts}/build_wheels.sh (100%) rename {scripts => release-scripts}/bump_versions.sh (97%) rename scripts/create_repos.sh => release-scripts/checkout_repos.sh (62%) rename {scripts => release-scripts}/create_release_artifact.sh (100%) rename {scripts => release-scripts}/create_release_commits.sh (100%) rename {scripts => release-scripts}/create_sdist.sh (96%) rename {scripts => release-scripts}/publish_release_commits.sh (100%) rename {scripts => release-scripts}/setup_venv_from_artifact.sh (98%) rename {scripts => release-scripts}/vars.sh (100%) rename {scripts => release-scripts}/versiontool.py (100%) delete mode 100644 resources/jobs/release/build-wheels.yml delete mode 100644 resources/jobs/release/create-release-commits.yml delete mode 100644 resources/jobs/release/publish-pypi.yml delete mode 100644 resources/jobs/release/publish-release-commits.yml delete mode 100644 resources/jobs/release/setup-host.yml delete mode 100644 resources/jobs/release/setup-venv-from-artifact.yml delete mode 100644 resources/jobs/release/verify.yml delete mode 100644 resources/release.yml delete mode 100755 scripts/setup_git.sh diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml new file mode 100644 index 0000000..caecb5e --- /dev/null +++ b/.github/workflows/angr-release.yml @@ -0,0 +1,167 @@ +name: angr Release + +on: + schedule: + - cron: "0 17 * * 2" + workflow_dispatch: + inputs: + dry_run: + description: "Dry run" + default: true + type: boolean + required: false + +jobs: + create: + name: Create release + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Configure git + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + - name: Checkout repos + run: release-scripts/checkout_repos.sh + - name: Create release commits + run: release-scripts/create_release_commits.sh + - name: Publish release.yml + uses: actions/upload-artifact@v4 + with: + name: release.yml + path: release.yml + - name: Create sdists + run: release-scripts/create_sdist.sh + - name: Publish sdist artifacts + uses: actions/upload-artifact@v4 + with: + name: sdist + path: sdist + - name: Check artifacts are valid for PyPI + run: | + pip install twine + twine check sdist/* + + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04, windows-2022, macos-12] + needs: create + + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + if: startsWith(matrix.os, 'ubuntu') + - name: Download sdists + uses: actions/download-artifact@v4 + with: + name: sdist + path: sdist + - name: Build wheels + run: release-scripts/build_wheels.sh sdist + - name: Upload wheel artifact + uses: actions/upload-artifact@v4 + with: + name: wheels-${{ matrix.os }} + path: wheels + - name: Check artifacts are valid for PyPI + run: | + pip install twine + twine check sdist/* + + verify: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04, windows-2022, macos-12, macos-14] + needs: build + + steps: + - name: Download wheels artifact + uses: actions/download-artifact@v4 + with: + name: wheels-${{ matrix.os }} + path: wheels-${{ matrix.os }} + + - name: Download ubuntu wheels artifact + if: matrix.os != 'ubuntu-22.04' + uses: actions/download-artifact@v4 + with: + name: wheels-ubuntu-22.04 + path: wheels-ubuntu-22.04 + + - name: Test wheel install + run: | + python -m venv angr_venv + source angr_venv/bin/activate &> /dev/null || source angr_venv/Scripts/activate + export PIP_FIND_LINKS="wheels-${{ matrix.os }} wheels-ubuntu-22.04" + pip install wheels-${{ matrix.os }}/*.whl + + - name: Test angr import + run: | + source angr_venv/bin/activate &> /dev/null || source angr_venv/Scripts/activate + python -c "import angr; print('angr imports!')" + + publish: + runs-on: ubuntu-22.04 + needs: verify + permissions: + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Git release commits + - name: Download repos artifact + uses: actions/download-artifact@v4 + with: + name: repos + path: repos + + - name: Publish release commits + run: release-scripts/publish_release_commits.sh + env: + DRY_RUN: ${{ github.event.inputs.dry_run }} + + - name: Bump versions on master + run: release-scripts/bump_versions.sh + env: + DRY_RUN: ${{ github.event.inputs.dry_run }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} + + # PyPI artifacts + - name: Create upload directory + run: mkdir dist + + - name: Download sdist artifact + uses: actions/download-artifact@v4 + with: + name: sdist + path: dist/sdist + - name: Download Ubuntu wheels artifact + uses: actions/download-artifact@v4 + with: + name: wheels-ubuntu-22.04 + path: dist/wheels-ubuntu-22.04 + - name: Download Windows wheels artifact + uses: actions/download-artifact@v4 + with: + name: wheels-windows-2022 + path: dist/wheels-windows-2022 + - name: Download macOS wheels artifact + uses: actions/download-artifact@v4 + with: + name: wheels-macos-12 + path: dist/wheels-macos-12 + + - name: Collect all packages to upload + run: find dist \( -name "*.tar.gz" -o -name "*.whl" \) -exec mv {} upload/ \; + + - name: Publish distribution to PyPI + if: github.event_name == 'schedule' || github.event.inputs.dry_run == false + uses: pypa/gh-action-pypi-publish@release/v1 + with: + verbose: true diff --git a/scripts/build_wheels.sh b/release-scripts/build_wheels.sh similarity index 100% rename from scripts/build_wheels.sh rename to release-scripts/build_wheels.sh diff --git a/scripts/bump_versions.sh b/release-scripts/bump_versions.sh similarity index 97% rename from scripts/bump_versions.sh rename to release-scripts/bump_versions.sh index 27a67e3..4c0a611 100755 --- a/scripts/bump_versions.sh +++ b/release-scripts/bump_versions.sh @@ -54,7 +54,7 @@ for i in $(ls $CHECKOUT_DIR); do git push origin bump/$VERSION gh pr create \ --project angr/$CHECKOUT_DIR \ - --assignees "@twizmwazin" \ + --assignees "twizmwazin" \ --title "Bump version to $VERSION" \ --body "Release pipeline failed to automatically push commit" \ --head "bump/$VERSION" \ diff --git a/scripts/create_repos.sh b/release-scripts/checkout_repos.sh similarity index 62% rename from scripts/create_repos.sh rename to release-scripts/checkout_repos.sh index e3f959c..3a84804 100755 --- a/scripts/create_repos.sh +++ b/release-scripts/checkout_repos.sh @@ -6,5 +6,5 @@ mkdir -p "repos" echo "!.git" > repos/.artifactignore for r in $REPOS $REPOS_LINUX_ONLY; do - git clone git@github.com:angr/$r.git $CHECKOUT_DIR/$r --depth=1 --recursive + git clone https://github.com/angr/$r.git $CHECKOUT_DIR/$r --depth=1 --recursive done diff --git a/scripts/create_release_artifact.sh b/release-scripts/create_release_artifact.sh similarity index 100% rename from scripts/create_release_artifact.sh rename to release-scripts/create_release_artifact.sh diff --git a/scripts/create_release_commits.sh b/release-scripts/create_release_commits.sh similarity index 100% rename from scripts/create_release_commits.sh rename to release-scripts/create_release_commits.sh diff --git a/scripts/create_sdist.sh b/release-scripts/create_sdist.sh similarity index 96% rename from scripts/create_sdist.sh rename to release-scripts/create_sdist.sh index 6234b09..b65899e 100755 --- a/scripts/create_sdist.sh +++ b/release-scripts/create_sdist.sh @@ -1,3 +1,4 @@ +#!/bin/bash set -ex source $(dirname $0)/vars.sh diff --git a/scripts/publish_release_commits.sh b/release-scripts/publish_release_commits.sh similarity index 100% rename from scripts/publish_release_commits.sh rename to release-scripts/publish_release_commits.sh diff --git a/scripts/setup_venv_from_artifact.sh b/release-scripts/setup_venv_from_artifact.sh similarity index 98% rename from scripts/setup_venv_from_artifact.sh rename to release-scripts/setup_venv_from_artifact.sh index 52c4ac7..7c4f8c5 100755 --- a/scripts/setup_venv_from_artifact.sh +++ b/release-scripts/setup_venv_from_artifact.sh @@ -1,3 +1,4 @@ +#!/bin/bash set -ex source $(dirname $0)/vars.sh diff --git a/scripts/vars.sh b/release-scripts/vars.sh similarity index 100% rename from scripts/vars.sh rename to release-scripts/vars.sh diff --git a/scripts/versiontool.py b/release-scripts/versiontool.py similarity index 100% rename from scripts/versiontool.py rename to release-scripts/versiontool.py diff --git a/resources/jobs/release/build-wheels.yml b/resources/jobs/release/build-wheels.yml deleted file mode 100644 index 16b017c..0000000 --- a/resources/jobs/release/build-wheels.yml +++ /dev/null @@ -1,33 +0,0 @@ -parameters: -- name: pools - type: object - default: [ "ubuntu-22.04", "windows-2022", "macos-11" ] - -jobs: -- ${{ each pool in parameters.pools }}: - - job: - displayName: Build wheels on ${{ pool }} - pool: - vmImage: ${{ pool }} - steps: - - template: setup-host.yml - - task: DownloadPipelineArtifact@2 - displayName: Download artifact ${{ parameters.artifact }} - inputs: - artifactName: sdist - targetPath: sdist - - - bash: scripts/build_wheels.sh sdist - displayName: Build wheels - - - task: PublishPipelineArtifact@1 - displayName: Publish wheel artifact - inputs: - artifactName: wheels-${{ pool }} - targetPath: wheels - - - script: python -m pip install twine - displayName: Install twine - - - script: python -m twine check wheels/* - displayName: Check artifacts are valid for PyPI diff --git a/resources/jobs/release/create-release-commits.yml b/resources/jobs/release/create-release-commits.yml deleted file mode 100644 index 2719a6b..0000000 --- a/resources/jobs/release/create-release-commits.yml +++ /dev/null @@ -1,44 +0,0 @@ -jobs: -- job: - displayName: Create release tags - pool: - vmImage: ubuntu-22.04 - steps: - - template: setup-host.yml - parameters: - git: true - - - bash: scripts/create_repos.sh - displayName: Checkout all repos - - - bash: scripts/create_release_commits.sh - displayName: Create release commits - - - task: PublishPipelineArtifact@1 - displayName: Publish repos artifact - inputs: - artifactName: repos - targetPath: repos - - - bash: scripts/create_release_artifact.sh - displayName: Create release artifact - - - task: PublishPipelineArtifact@1 - displayName: Publish release.yml - inputs: - artifactName: release.yml - targetPath: release.yml - - - bash: scripts/create_sdist.sh - displayName: Create sdists - - - task: PublishPipelineArtifact@1 - displayName: Publish sdist pacakges - inputs: - artifactName: sdist - targetPath: sdist - - - script: pip install twine - - - script: twine check sdist/* - displayName: Check artifacts are valid for PyPI diff --git a/resources/jobs/release/publish-pypi.yml b/resources/jobs/release/publish-pypi.yml deleted file mode 100644 index f088741..0000000 --- a/resources/jobs/release/publish-pypi.yml +++ /dev/null @@ -1,42 +0,0 @@ -parameters: -- name: dry_run - type: boolean - default: true -- name: artifacts - type: object - default: [ "sdist", "wheels-windows-2022", "wheels-macos-11", "wheels-ubuntu-22.04" ] - -jobs: -- job: - displayName: Publish artifacts to PyPI - pool: - vmImage: ubuntu-22.04 - steps: - - task: UsePythonVersion@0 - displayName: Use python 3.10 - inputs: - versionSpec: "3.10" - - - script: pip install twine - - - script: mkdir upload - - - ${{ each artifact in parameters.artifacts }}: - - task: DownloadPipelineArtifact@2 - displayName: Download ${{ artifact }} - inputs: - artifactName: ${{ artifact }} - targetPath: ${{ artifact }} - - - script: find . \( -name "*.tar.gz" -o -name "*.whl" \) -exec mv {} upload/ \; - displayName: Collect all packages to upload - - - script: ls upload - displayName: List files to be uploaded - - - script: twine upload --non-interactive upload/* - condition: eq(${{ parameters.dry_run }}, false) - displayName: Upload to pypi - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: $(pypiToken) diff --git a/resources/jobs/release/publish-release-commits.yml b/resources/jobs/release/publish-release-commits.yml deleted file mode 100644 index d5c3433..0000000 --- a/resources/jobs/release/publish-release-commits.yml +++ /dev/null @@ -1,31 +0,0 @@ -parameters: -- name: dry_run - type: boolean - default: true - -jobs: -- job: - displayName: Publish release commits - pool: - vmImage: ubuntu-22.04 - steps: - - template: setup-host.yml - parameters: - git: true - - - task: DownloadPipelineArtifact@2 - displayName: Download repos - inputs: - artifactName: repos - targetPath: repos - - - bash: scripts/publish_release_commits.sh - displayName: Publish release commits - env: - DRY_RUN: ${{ lower(parameters.dry_run) }} - - - bash: scripts/bump_versions.sh - displayName: Bump versions on master - env: - DRY_RUN: ${{ lower(parameters.dry_run) }} - GH_TOKEN: $(GH_TOKEN) diff --git a/resources/jobs/release/setup-host.yml b/resources/jobs/release/setup-host.yml deleted file mode 100644 index 1461dc3..0000000 --- a/resources/jobs/release/setup-host.yml +++ /dev/null @@ -1,31 +0,0 @@ -parameters: -- name: python - type: string - default: python -- name: git - type: boolean - default: false - -steps: -- task: BatchScript@1 - displayName: Call vcvars64.bat - condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) - inputs: - filename: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat - failOnStandardError: true - modifyEnvironment: true - -- bash: echo '##vso[task.setvariable variable=python]${{ parameters.python }}' - displayName: Set python variable value - -- ${{ if eq(parameters.python, 'python') }}: - - task: UsePythonVersion@0 - displayName: Use python 3.10 - inputs: - versionSpec: "3.10" - -- ${{ if parameters.git }}: - - bash: scripts/setup_git.sh - displayName: Set up git - env: - sshKey: $(sshKey) diff --git a/resources/jobs/release/setup-venv-from-artifact.yml b/resources/jobs/release/setup-venv-from-artifact.yml deleted file mode 100644 index 974983e..0000000 --- a/resources/jobs/release/setup-venv-from-artifact.yml +++ /dev/null @@ -1,14 +0,0 @@ -parameters: -- name: artifact - type: string - default: sdist - -steps: - - task: DownloadPipelineArtifact@2 - displayName: Download artifact ${{ parameters.artifact }} - inputs: - artifactName: ${{ parameters.artifact }} - targetPath: ${{ parameters.artifact }} - - - bash: scripts/setup_venv_from_artifact.sh $(python) ${{ parameters.artifact }} angr_venv - displayName: Setup venv from ${{ parameters.artifact }} diff --git a/resources/jobs/release/verify.yml b/resources/jobs/release/verify.yml deleted file mode 100644 index 6c89b1d..0000000 --- a/resources/jobs/release/verify.yml +++ /dev/null @@ -1,38 +0,0 @@ -parameters: -- name: pools - type: object - default: [ "ubuntu-22.04", "windows-2022", "macos-11" ] - -jobs: -- ${{ each pool in parameters.pools }}: - - job: - displayName: Verify on ${{ pool }} - pool: - vmImage: ${{ pool }} - steps: - - template: setup-host.yml - - - task: DownloadPipelineArtifact@2 - displayName: Download artifact wheels-${{ pool }} - inputs: - artifactName: wheels-${{ pool }} - targetPath: wheels-${{ pool }} - - - task: DownloadPipelineArtifact@2 - displayName: Download artifact wheels-${{ pool }} - condition: not(eq('${{ pool }}', 'ubuntu-22.04')) - inputs: - artifactName: wheels-ubuntu-22.04 - targetPath: wheels-ubuntu-22.04 - - - bash: | - python -m venv angr_venv - source angr_venv/bin/activate &> /dev/null || source angr_venv/Scripts/activate - export PIP_FIND_LINKS="wheels-${{ pool }} wheels-ubuntu-22.04" - pip install wheels-${{ pool }}/*.whl - displayName: Test wheel install - - - bash: | - source angr_venv/bin/activate &> /dev/null || source angr_venv/Scripts/activate - python -c "import angr; print('angr imports!')" - displayName: Test angr import diff --git a/resources/release.yml b/resources/release.yml deleted file mode 100644 index 706c989..0000000 --- a/resources/release.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: $(BuildID) -trigger: none -pr: none -schedules: -- cron: "0 17 * * 2" - displayName: Weekly Tuesday release - branches: - include: - - master - always: true -parameters: -- name: dry_run - type: boolean - default: false - - -stages: -- stage: create - displayName: Create release - jobs: - - template: jobs/release/create-release-commits.yml - -- stage: build - displayName: Build docs and wheels - jobs: - - template: jobs/release/build-wheels.yml - dependsOn: - - create - -- stage: verify - displayName: Verify wheels - jobs: - - template: jobs/release/verify.yml - dependsOn: - - build - -- stage: publish - displayName: Publish release - jobs: - - template: jobs/release/publish-release-commits.yml - parameters: - dry_run: ${{ parameters.dry_run }} - - template: jobs/release/publish-pypi.yml - parameters: - dry_run: ${{ parameters.dry_run }} - dependsOn: - - verify diff --git a/scripts/setup_git.sh b/scripts/setup_git.sh deleted file mode 100755 index 0ca2b26..0000000 --- a/scripts/setup_git.sh +++ /dev/null @@ -1,12 +0,0 @@ -set -e - -git config --global user.name "angr release bot" -git config --global user.email "angr-dev@asu.edu" - -mkdir -p ~/.ssh -echo "-----BEGIN OPENSSH PRIVATE KEY----- -$(echo "$sshKey" | sed "s/ /\n/g") ------END OPENSSH PRIVATE KEY-----" > ~/.ssh/id_rsa -chmod 400 ~/.ssh/id_rsa - -echo "github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==" >> ~/.ssh/known_hosts From f89a27a74fd6b6cb0409c6eeb9894ea1fb82d4a7 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 14:46:32 -0700 Subject: [PATCH 04/35] Fix dry run params --- .github/workflows/angr-release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index caecb5e..9fd16bd 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -124,12 +124,13 @@ jobs: - name: Publish release commits run: release-scripts/publish_release_commits.sh env: - DRY_RUN: ${{ github.event.inputs.dry_run }} + DRY_RUN: ${{ github.event_name == 'schedule' || github.event.inputs.dry_run == false }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} - name: Bump versions on master run: release-scripts/bump_versions.sh env: - DRY_RUN: ${{ github.event.inputs.dry_run }} + DRY_RUN: ${{ github.event_name == 'schedule' || github.event.inputs.dry_run == false }} GH_TOKEN: ${{ secrets.GH_TOKEN }} # PyPI artifacts From 05367eb7f2f596fa25d4605f5fdd900be6c20a56 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 15:47:09 -0700 Subject: [PATCH 05/35] Add a pull_request trigger to CI the release process --- .github/workflows/angr-release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index 9fd16bd..e0e79fe 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -1,6 +1,10 @@ name: angr Release on: + pull_request: + paths: + - .github/workflows/angr-release.yml + - release-scripts/* schedule: - cron: "0 17 * * 2" workflow_dispatch: From 09914b10d643660ad77e2fc75152ef7244008329 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 15:48:27 -0700 Subject: [PATCH 06/35] Configure git globally --- .github/workflows/angr-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index e0e79fe..4cdc223 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -24,8 +24,8 @@ jobs: uses: actions/checkout@v4 - name: Configure git run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - name: Checkout repos run: release-scripts/checkout_repos.sh - name: Create release commits From a398614cd1071ce908d7f79ce6a5b325dc098c0d Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 15:56:42 -0700 Subject: [PATCH 07/35] Checkout repo in build step --- .github/workflows/angr-release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index 4cdc223..d714893 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -55,6 +55,8 @@ jobs: needs: create steps: + - name: Checkout + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 if: startsWith(matrix.os, 'ubuntu') From 0de0725d9d008d783b4046147de91c80ac007fb4 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 15:58:46 -0700 Subject: [PATCH 08/35] Add setup python step to verify --- .github/workflows/angr-release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index d714893..c373ea7 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -85,6 +85,10 @@ jobs: needs: build steps: + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Download wheels artifact uses: actions/download-artifact@v4 with: From 7d12016f7b2bea530d81610d4696f2d642331ab2 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 16:01:46 -0700 Subject: [PATCH 09/35] Setup python in build step --- .github/workflows/angr-release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index c373ea7..423e88a 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -59,6 +59,10 @@ jobs: uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' if: startsWith(matrix.os, 'ubuntu') - name: Download sdists uses: actions/download-artifact@v4 @@ -85,7 +89,8 @@ jobs: needs: build steps: - - uses: actions/setup-python@v5 + - name: Setup Python + uses: actions/setup-python@v5 with: python-version: '3.10' From 9cb9b8409a3997afc32a839f2a84d1ca543f79c5 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 16:05:26 -0700 Subject: [PATCH 10/35] Fix trying to setup qemu on non-linux --- .github/workflows/angr-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index 423e88a..71fc879 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -58,12 +58,12 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Set up QEMU + if: startsWith(matrix.os, 'ubuntu') uses: docker/setup-qemu-action@v3 - name: Setup Python uses: actions/setup-python@v5 with: python-version: '3.10' - if: startsWith(matrix.os, 'ubuntu') - name: Download sdists uses: actions/download-artifact@v4 with: From eb3726aff5514e4b49a437d6acdd9ea97dd52898 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 16:18:08 -0700 Subject: [PATCH 11/35] Run shell scripts with bash and error if artifacts are not uploaded --- .github/workflows/angr-release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index 71fc879..1674421 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -15,6 +15,10 @@ on: type: boolean required: false +defaults: + run: + shell: bash + jobs: create: name: Create release @@ -42,6 +46,7 @@ jobs: with: name: sdist path: sdist + if-no-files-found: error - name: Check artifacts are valid for PyPI run: | pip install twine @@ -76,6 +81,7 @@ jobs: with: name: wheels-${{ matrix.os }} path: wheels + if-no-files-found: error - name: Check artifacts are valid for PyPI run: | pip install twine From d873e56fc9e841c8ea45e5251c9e4b1da225cbde Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 16:26:17 -0700 Subject: [PATCH 12/35] Call vcvars64 on windows --- .github/workflows/angr-release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index 1674421..50795c6 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -75,7 +75,14 @@ jobs: name: sdist path: sdist - name: Build wheels + if: ! startsWith(matrix.os, 'windows') run: release-scripts/build_wheels.sh sdist + - name: Build wheels + if: startsWith(matrix.os, 'windows') + run: | + C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat + bash release-scripts/build_wheels.sh sdist + shell: cmd - name: Upload wheel artifact uses: actions/upload-artifact@v4 with: From 3b0a50001ecc2dabe9837b7948ff37fd9162f6a1 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 18:00:47 -0700 Subject: [PATCH 13/35] Fix syntax --- .github/workflows/angr-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index 50795c6..43d57e2 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -75,7 +75,7 @@ jobs: name: sdist path: sdist - name: Build wheels - if: ! startsWith(matrix.os, 'windows') + if: startsWith(matrix.os, 'windows') == true run: release-scripts/build_wheels.sh sdist - name: Build wheels if: startsWith(matrix.os, 'windows') From 87ea1f01bd476bf39f9843fc065bb63880004985 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 18:02:51 -0700 Subject: [PATCH 14/35] Fix incorrect comparison --- .github/workflows/angr-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index 43d57e2..00b5dc2 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -75,7 +75,7 @@ jobs: name: sdist path: sdist - name: Build wheels - if: startsWith(matrix.os, 'windows') == true + if: startsWith(matrix.os, 'windows') != true run: release-scripts/build_wheels.sh sdist - name: Build wheels if: startsWith(matrix.os, 'windows') From 11c4b7e591f24efc9c584ac30b121d1dfbdddae1 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 18:10:24 -0700 Subject: [PATCH 15/35] Quote vcvars64.bat call --- .github/workflows/angr-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index 00b5dc2..92946ea 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -80,7 +80,7 @@ jobs: - name: Build wheels if: startsWith(matrix.os, 'windows') run: | - C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat + "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" bash release-scripts/build_wheels.sh sdist shell: cmd - name: Upload wheel artifact From 7fb5e37e4130627220b402fe5a8e8f3c06674e80 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 18:14:40 -0700 Subject: [PATCH 16/35] Add a call --- .github/workflows/angr-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index 92946ea..e9e3b3f 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -80,7 +80,7 @@ jobs: - name: Build wheels if: startsWith(matrix.os, 'windows') run: | - "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" bash release-scripts/build_wheels.sh sdist shell: cmd - name: Upload wheel artifact From 77609d0c38da9502c47d05ac2a8b182bfd835ba9 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 18:26:23 -0700 Subject: [PATCH 17/35] Redo wheel downloading in verify step --- .github/workflows/angr-release.yml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index e9e3b3f..5774a14 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -108,24 +108,39 @@ jobs: python-version: '3.10' - name: Download wheels artifact + if: startsWith(matrix.os, 'ubuntu') uses: actions/download-artifact@v4 with: - name: wheels-${{ matrix.os }} - path: wheels-${{ matrix.os }} + name: wheels-ubuntu-22.04 + path: wheels-ubuntu + + - name: Download wheels artifact + if: startsWith(matrix.os, 'windows') + uses: actions/download-artifact@v4 + with: + name: wheels-windows-2022 + path: wheels + + - name: Download wheels artifact + if: startsWith(matrix.os, 'macos') + uses: actions/download-artifact@v4 + with: + name: wheels-macos-12 + path: wheels - name: Download ubuntu wheels artifact - if: matrix.os != 'ubuntu-22.04' + if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macos') uses: actions/download-artifact@v4 with: name: wheels-ubuntu-22.04 - path: wheels-ubuntu-22.04 + path: wheels-ubuntu - name: Test wheel install run: | python -m venv angr_venv source angr_venv/bin/activate &> /dev/null || source angr_venv/Scripts/activate - export PIP_FIND_LINKS="wheels-${{ matrix.os }} wheels-ubuntu-22.04" - pip install wheels-${{ matrix.os }}/*.whl + export PIP_FIND_LINKS="wheels wheels-ubuntu" + pip install wheels/*.whl - name: Test angr import run: | From 4229be70aa73a047c58460d6c09384c03847575b Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 18:27:02 -0700 Subject: [PATCH 18/35] Remove release artifact --- .github/workflows/angr-release.yml | 5 ----- release-scripts/create_release_artifact.sh | 10 ---------- 2 files changed, 15 deletions(-) delete mode 100755 release-scripts/create_release_artifact.sh diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index 5774a14..7eddebf 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -34,11 +34,6 @@ jobs: run: release-scripts/checkout_repos.sh - name: Create release commits run: release-scripts/create_release_commits.sh - - name: Publish release.yml - uses: actions/upload-artifact@v4 - with: - name: release.yml - path: release.yml - name: Create sdists run: release-scripts/create_sdist.sh - name: Publish sdist artifacts diff --git a/release-scripts/create_release_artifact.sh b/release-scripts/create_release_artifact.sh deleted file mode 100755 index bdfdbb6..0000000 --- a/release-scripts/create_release_artifact.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -ex - -source "$(dirname "$0")/vars.sh" - -OUTPUT=release.yml - -for i in $(ls $CHECKOUT_DIR); do - echo "$i: $(git -C "$CHECKOUT_DIR/$i" rev-parse HEAD)" >> "$OUTPUT" -done From f0707c23ca38168f989ccb921b493c427b271879 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 18:46:44 -0700 Subject: [PATCH 19/35] Specify CIBW_ARCHS_* --- release-scripts/build_wheels.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release-scripts/build_wheels.sh b/release-scripts/build_wheels.sh index 7bc6111..4f9e117 100755 --- a/release-scripts/build_wheels.sh +++ b/release-scripts/build_wheels.sh @@ -36,6 +36,9 @@ export CIBW_BUILD=" cp310-macosx_x86_64 cp310-macosx_arm64 " +export CIBW_ARCHS_WINDOWS="AMD64" +export CIBW_ARCHS_MACOS="x86_64 arm64 universal2" +export CIBW_ARCHS_LINUX="x86_64 aarch64" export CIBW_REPAIR_WHEEL_COMMAND="" for dist in $(ls); do package=$(cat $dist/PKG-INFO | grep '^Name: [a-zA-Z0-9-]\+$' | head -n 1 | cut -d' ' -f2) From fd7c919ad0b077f91cd2672777dea92309a55c09 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 19:16:23 -0700 Subject: [PATCH 20/35] Add a find --- .github/workflows/angr-release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index 7eddebf..c6017f9 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -130,6 +130,9 @@ jobs: name: wheels-ubuntu-22.04 path: wheels-ubuntu + - name: Find + run: find . + - name: Test wheel install run: | python -m venv angr_venv From 6686a865c367cd63ad3d7a47d680729d0c7481de Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 19:39:18 -0700 Subject: [PATCH 21/35] Specify to build universal2 wheels on macos --- release-scripts/build_wheels.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/release-scripts/build_wheels.sh b/release-scripts/build_wheels.sh index 4f9e117..0459425 100755 --- a/release-scripts/build_wheels.sh +++ b/release-scripts/build_wheels.sh @@ -35,6 +35,7 @@ export CIBW_BUILD=" cp310-win_amd64 cp310-macosx_x86_64 cp310-macosx_arm64 + cp310-macosx_universal2 " export CIBW_ARCHS_WINDOWS="AMD64" export CIBW_ARCHS_MACOS="x86_64 arm64 universal2" From f015a4ff922bec3af22ae89f7ea0d1d6afe5ec8a Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 19:39:26 -0700 Subject: [PATCH 22/35] Fix ubuntu wheel path --- .github/workflows/angr-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index c6017f9..fa4898c 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -107,7 +107,7 @@ jobs: uses: actions/download-artifact@v4 with: name: wheels-ubuntu-22.04 - path: wheels-ubuntu + path: wheels - name: Download wheels artifact if: startsWith(matrix.os, 'windows') From 2b42b8e2ba5f96ddc48d9598dce70e0fc798e3f1 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 19:42:14 -0700 Subject: [PATCH 23/35] Fix wheel installation on macos --- .github/workflows/angr-release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index fa4898c..73213ad 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -138,7 +138,11 @@ jobs: python -m venv angr_venv source angr_venv/bin/activate &> /dev/null || source angr_venv/Scripts/activate export PIP_FIND_LINKS="wheels wheels-ubuntu" - pip install wheels/*.whl + if [ $(uname) == "Darwin" ]; then + pip install wheels/angr*$(arch).whl + else + pip install wheels/angr*.whl + fi - name: Test angr import run: | From 6ea30b6a3685b1ae3f841d72410c1be93af8b8fb Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 20:18:32 -0700 Subject: [PATCH 24/35] Specify arch on linux too --- .github/workflows/angr-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index 73213ad..d27db37 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -138,7 +138,7 @@ jobs: python -m venv angr_venv source angr_venv/bin/activate &> /dev/null || source angr_venv/Scripts/activate export PIP_FIND_LINKS="wheels wheels-ubuntu" - if [ $(uname) == "Darwin" ]; then + if [ $(uname) == "Darwin" || $(uname) == "Linux" ]; then pip install wheels/angr*$(arch).whl else pip install wheels/angr*.whl From e3f3b535bfdba90fd4b81da887cb78417523feca Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 20:45:23 -0700 Subject: [PATCH 25/35] Do [[ instead of [ --- .github/workflows/angr-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index d27db37..c42b261 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -138,7 +138,7 @@ jobs: python -m venv angr_venv source angr_venv/bin/activate &> /dev/null || source angr_venv/Scripts/activate export PIP_FIND_LINKS="wheels wheels-ubuntu" - if [ $(uname) == "Darwin" || $(uname) == "Linux" ]; then + if [[ $(uname) == "Darwin" || $(uname) == "Linux" ]]; then pip install wheels/angr*$(arch).whl else pip install wheels/angr*.whl From 2a3677fc69006a626377698678d962c2ececc539 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Thu, 16 May 2024 21:05:24 -0700 Subject: [PATCH 26/35] Add a sed --- .github/workflows/angr-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index c42b261..5ddbcfc 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -139,7 +139,7 @@ jobs: source angr_venv/bin/activate &> /dev/null || source angr_venv/Scripts/activate export PIP_FIND_LINKS="wheels wheels-ubuntu" if [[ $(uname) == "Darwin" || $(uname) == "Linux" ]]; then - pip install wheels/angr*$(arch).whl + pip install wheels/angr*$(arch | sed s/i386/x86_64/g).whl else pip install wheels/angr*.whl fi From b6bd3a246a522ab4a2fffe0ddd39b7788fa01031 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Tue, 21 May 2024 11:12:34 -0700 Subject: [PATCH 27/35] Try to fix macos arm64 build --- .github/workflows/angr-release.yml | 26 ++++++++------------------ release-scripts/build_wheels.sh | 2 -- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index 5ddbcfc..9e94d87 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -51,7 +51,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, windows-2022, macos-12] + os: [ubuntu-22.04, windows-2022, macos-12, macos-14] needs: create steps: @@ -103,24 +103,9 @@ jobs: python-version: '3.10' - name: Download wheels artifact - if: startsWith(matrix.os, 'ubuntu') - uses: actions/download-artifact@v4 - with: - name: wheels-ubuntu-22.04 - path: wheels - - - name: Download wheels artifact - if: startsWith(matrix.os, 'windows') uses: actions/download-artifact@v4 with: - name: wheels-windows-2022 - path: wheels - - - name: Download wheels artifact - if: startsWith(matrix.os, 'macos') - uses: actions/download-artifact@v4 - with: - name: wheels-macos-12 + name: wheels-${{ matrix.os }} path: wheels - name: Download ubuntu wheels artifact @@ -197,11 +182,16 @@ jobs: with: name: wheels-windows-2022 path: dist/wheels-windows-2022 - - name: Download macOS wheels artifact + - name: Download macOS x86_64 wheels artifact uses: actions/download-artifact@v4 with: name: wheels-macos-12 path: dist/wheels-macos-12 + - name: Download macOS arm64 wheels artifact + uses: actions/download-artifact@v4 + with: + name: wheels-macos-14 + path: dist/wheels-macos-14 - name: Collect all packages to upload run: find dist \( -name "*.tar.gz" -o -name "*.whl" \) -exec mv {} upload/ \; diff --git a/release-scripts/build_wheels.sh b/release-scripts/build_wheels.sh index 0459425..5104be3 100755 --- a/release-scripts/build_wheels.sh +++ b/release-scripts/build_wheels.sh @@ -35,10 +35,8 @@ export CIBW_BUILD=" cp310-win_amd64 cp310-macosx_x86_64 cp310-macosx_arm64 - cp310-macosx_universal2 " export CIBW_ARCHS_WINDOWS="AMD64" -export CIBW_ARCHS_MACOS="x86_64 arm64 universal2" export CIBW_ARCHS_LINUX="x86_64 aarch64" export CIBW_REPAIR_WHEEL_COMMAND="" for dist in $(ls); do From 4c8dcb6e1613473e6a80dbc4c1c5958579b0075a Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Tue, 21 May 2024 11:37:17 -0700 Subject: [PATCH 28/35] Ignore capstone wheel --- .github/workflows/angr-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index 9e94d87..074a824 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -124,7 +124,7 @@ jobs: source angr_venv/bin/activate &> /dev/null || source angr_venv/Scripts/activate export PIP_FIND_LINKS="wheels wheels-ubuntu" if [[ $(uname) == "Darwin" || $(uname) == "Linux" ]]; then - pip install wheels/angr*$(arch | sed s/i386/x86_64/g).whl + pip install --no-binary capstone wheels/angr*$(arch | sed s/i386/x86_64/g).whl else pip install wheels/angr*.whl fi From bfdee6e0a50b2504d44ed7b967a76989e4423951 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Tue, 21 May 2024 15:26:24 -0700 Subject: [PATCH 29/35] Publish repos artifact --- .github/workflows/angr-release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index 074a824..49aefef 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -36,6 +36,12 @@ jobs: run: release-scripts/create_release_commits.sh - name: Create sdists run: release-scripts/create_sdist.sh + - name: Publish repo artifacts + uses: actions/upload-artifact@v4 + with: + name: repos + path: repos + if-no-files-found: error - name: Publish sdist artifacts uses: actions/upload-artifact@v4 with: From 283359d1abea5d37088f92c38ced4c7ae1dc10d4 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Tue, 21 May 2024 15:52:20 -0700 Subject: [PATCH 30/35] Use https for git clones --- release-scripts/bump_versions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-scripts/bump_versions.sh b/release-scripts/bump_versions.sh index 4c0a611..c44204f 100755 --- a/release-scripts/bump_versions.sh +++ b/release-scripts/bump_versions.sh @@ -8,7 +8,7 @@ pip install packaging export CHECKOUT_DIR=$(mktemp -d) for r in $REPOS $REPOS_LINUX_ONLY; do - git clone git@github.com:angr/$r.git $CHECKOUT_DIR/$r --depth=1 --recursive + git clone https://github.com/angr/$r.git $CHECKOUT_DIR/$r --depth=1 --recursive done for i in $(ls $CHECKOUT_DIR); do From 8eb9f6fc309ba4b19886f8593ccaa5f75dcc0f08 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Tue, 21 May 2024 16:11:51 -0700 Subject: [PATCH 31/35] Configure git in release step --- .github/workflows/angr-release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index 49aefef..d43a33e 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -150,6 +150,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Configure git + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" + # Git release commits - name: Download repos artifact uses: actions/download-artifact@v4 From 52d6d2f5077019a25ea18dc0333929821dbc5b52 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Wed, 22 May 2024 09:15:05 -0700 Subject: [PATCH 32/35] Fix wheel copying --- .github/workflows/angr-release.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index d43a33e..47eaaa4 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -175,37 +175,37 @@ jobs: GH_TOKEN: ${{ secrets.GH_TOKEN }} # PyPI artifacts - - name: Create upload directory - run: mkdir dist + - name: Create artifacts and dist directories + run: mkdir artifacts dist - name: Download sdist artifact uses: actions/download-artifact@v4 with: name: sdist - path: dist/sdist + path: artifacts/sdist - name: Download Ubuntu wheels artifact uses: actions/download-artifact@v4 with: name: wheels-ubuntu-22.04 - path: dist/wheels-ubuntu-22.04 + path: artifacts/wheels-ubuntu-22.04 - name: Download Windows wheels artifact uses: actions/download-artifact@v4 with: name: wheels-windows-2022 - path: dist/wheels-windows-2022 + path: artifacts/wheels-windows-2022 - name: Download macOS x86_64 wheels artifact uses: actions/download-artifact@v4 with: name: wheels-macos-12 - path: dist/wheels-macos-12 + path: artifacts/wheels-macos-12 - name: Download macOS arm64 wheels artifact uses: actions/download-artifact@v4 with: name: wheels-macos-14 - path: dist/wheels-macos-14 + path: artifacts/wheels-macos-14 - name: Collect all packages to upload - run: find dist \( -name "*.tar.gz" -o -name "*.whl" \) -exec mv {} upload/ \; + run: find artifacts \( -name "*.tar.gz" -o -name "*.whl" \) -exec mv {} dist/ \; - name: Publish distribution to PyPI if: github.event_name == 'schedule' || github.event.inputs.dry_run == false From e1c4e99e34496fd4c7465f12e5cf31a28558662c Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Wed, 22 May 2024 09:15:22 -0700 Subject: [PATCH 33/35] Format --- .github/workflows/angr-release.yml | 138 ++++++++++++++--------------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index 47eaaa4..478e44b 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -69,7 +69,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: "3.10" - name: Download sdists uses: actions/download-artifact@v4 with: @@ -81,8 +81,8 @@ jobs: - name: Build wheels if: startsWith(matrix.os, 'windows') run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" - bash release-scripts/build_wheels.sh sdist + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" + bash release-scripts/build_wheels.sh sdist shell: cmd - name: Upload wheel artifact uses: actions/upload-artifact@v4 @@ -106,7 +106,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: "3.10" - name: Download wheels artifact uses: actions/download-artifact@v4 @@ -147,68 +147,68 @@ jobs: id-token: write steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Configure git - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - - # Git release commits - - name: Download repos artifact - uses: actions/download-artifact@v4 - with: - name: repos - path: repos - - - name: Publish release commits - run: release-scripts/publish_release_commits.sh - env: - DRY_RUN: ${{ github.event_name == 'schedule' || github.event.inputs.dry_run == false }} - GH_TOKEN: ${{ secrets.GH_TOKEN }} - - - name: Bump versions on master - run: release-scripts/bump_versions.sh - env: - DRY_RUN: ${{ github.event_name == 'schedule' || github.event.inputs.dry_run == false }} - GH_TOKEN: ${{ secrets.GH_TOKEN }} - - # PyPI artifacts - - name: Create artifacts and dist directories - run: mkdir artifacts dist - - - name: Download sdist artifact - uses: actions/download-artifact@v4 - with: - name: sdist - path: artifacts/sdist - - name: Download Ubuntu wheels artifact - uses: actions/download-artifact@v4 - with: - name: wheels-ubuntu-22.04 - path: artifacts/wheels-ubuntu-22.04 - - name: Download Windows wheels artifact - uses: actions/download-artifact@v4 - with: - name: wheels-windows-2022 - path: artifacts/wheels-windows-2022 - - name: Download macOS x86_64 wheels artifact - uses: actions/download-artifact@v4 - with: - name: wheels-macos-12 - path: artifacts/wheels-macos-12 - - name: Download macOS arm64 wheels artifact - uses: actions/download-artifact@v4 - with: - name: wheels-macos-14 - path: artifacts/wheels-macos-14 - - - name: Collect all packages to upload - run: find artifacts \( -name "*.tar.gz" -o -name "*.whl" \) -exec mv {} dist/ \; - - - name: Publish distribution to PyPI - if: github.event_name == 'schedule' || github.event.inputs.dry_run == false - uses: pypa/gh-action-pypi-publish@release/v1 - with: - verbose: true + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Configure git + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" + + # Git release commits + - name: Download repos artifact + uses: actions/download-artifact@v4 + with: + name: repos + path: repos + + - name: Publish release commits + run: release-scripts/publish_release_commits.sh + env: + DRY_RUN: ${{ github.event_name == 'schedule' || github.event.inputs.dry_run == false }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} + + - name: Bump versions on master + run: release-scripts/bump_versions.sh + env: + DRY_RUN: ${{ github.event_name == 'schedule' || github.event.inputs.dry_run == false }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} + + # PyPI artifacts + - name: Create artifacts and dist directories + run: mkdir artifacts dist + + - name: Download sdist artifact + uses: actions/download-artifact@v4 + with: + name: sdist + path: artifacts/sdist + - name: Download Ubuntu wheels artifact + uses: actions/download-artifact@v4 + with: + name: wheels-ubuntu-22.04 + path: artifacts/wheels-ubuntu-22.04 + - name: Download Windows wheels artifact + uses: actions/download-artifact@v4 + with: + name: wheels-windows-2022 + path: artifacts/wheels-windows-2022 + - name: Download macOS x86_64 wheels artifact + uses: actions/download-artifact@v4 + with: + name: wheels-macos-12 + path: artifacts/wheels-macos-12 + - name: Download macOS arm64 wheels artifact + uses: actions/download-artifact@v4 + with: + name: wheels-macos-14 + path: artifacts/wheels-macos-14 + + - name: Collect all packages to upload + run: find artifacts \( -name "*.tar.gz" -o -name "*.whl" \) -exec mv {} dist/ \; + + - name: Publish distribution to PyPI + if: github.event_name == 'schedule' || github.event.inputs.dry_run == false + uses: pypa/gh-action-pypi-publish@release/v1 + with: + verbose: true From dac623cf7483556203bd1a797a65750775310b37 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Wed, 22 May 2024 10:01:02 -0700 Subject: [PATCH 34/35] Add debug echo --- .github/workflows/angr-release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index 478e44b..adfbe07 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -207,6 +207,12 @@ jobs: - name: Collect all packages to upload run: find artifacts \( -name "*.tar.gz" -o -name "*.whl" \) -exec mv {} dist/ \; + - name: Echo conditions + run: | + echo "Event name: ${{ github.event_name }}" + echo "Dry run parameter: ${{ github.event.inputs.dry_run }}" + echo "Dry run: ${{ github.event_name == 'schedule' || github.event.inputs.dry_run == false }}" + - name: Publish distribution to PyPI if: github.event_name == 'schedule' || github.event.inputs.dry_run == false uses: pypa/gh-action-pypi-publish@release/v1 From 6eeafe22210978924d9fe0620baa06759722c1a6 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Wed, 22 May 2024 10:33:21 -0700 Subject: [PATCH 35/35] Invert skip logic --- .github/workflows/angr-release.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/angr-release.yml b/.github/workflows/angr-release.yml index adfbe07..beab076 100644 --- a/.github/workflows/angr-release.yml +++ b/.github/workflows/angr-release.yml @@ -207,14 +207,8 @@ jobs: - name: Collect all packages to upload run: find artifacts \( -name "*.tar.gz" -o -name "*.whl" \) -exec mv {} dist/ \; - - name: Echo conditions - run: | - echo "Event name: ${{ github.event_name }}" - echo "Dry run parameter: ${{ github.event.inputs.dry_run }}" - echo "Dry run: ${{ github.event_name == 'schedule' || github.event.inputs.dry_run == false }}" - - name: Publish distribution to PyPI - if: github.event_name == 'schedule' || github.event.inputs.dry_run == false + if: (github.event_name == 'schedule' || github.event.inputs.dry_run == false) != true uses: pypa/gh-action-pypi-publish@release/v1 with: verbose: true