Skip to content

Commit

Permalink
Migrate to Ubuntu 22.04, Python 3.10 (#49)
Browse files Browse the repository at this point in the history
* Migrate to Ubuntu 22.04, Python 3.10

* Rename azure scripts to ga

* Add workflow to automatically publish image

---------

Co-authored-by: Kevin Phoenix <[email protected]>
  • Loading branch information
mborgerson and twizmwazin authored May 8, 2024
1 parent ff69d44 commit 5e940c0
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/angr-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
jobs:
build:
name: Build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
container:
image: ${{ inputs.container_image }}
steps:
Expand All @@ -38,7 +38,7 @@ jobs:

lint:
name: Lint
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
container:
image: ${{ inputs.container_image }}
needs: build
Expand All @@ -51,7 +51,7 @@ jobs:

test:
name: Test
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
container:
image: ${{ inputs.container_image }}
options: -v /var/run/docker.sock:/var/run/docker.sock -v /proc:/hostproc --cap-add=SYS_PTRACE --security-opt seccomp:unconfined
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/publish-ci-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish angr ci docker image

on:
push:
branches: ["master"]
workflow_dispatch:

jobs:
update:
name: Build and publish angr docker image
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Build ci image
run: |
docker build -t angr/ci:3 ci-image
- name: Login to docker hub
run: echo $DOCKER_PASSWORD | docker login -u angrbot --password-stdin
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}
- name: Push ci image
run: docker push angr/ci:3
2 changes: 1 addition & 1 deletion ci-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND noninteractive
USER root
WORKDIR /root
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion resources/jobs/release/build-wheels.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
- name: pools
type: object
default: [ "ubuntu-20.04", "windows-2022", "macos-11" ]
default: [ "ubuntu-22.04", "windows-2022", "macos-11" ]

jobs:
- ${{ each pool in parameters.pools }}:
Expand Down
2 changes: 1 addition & 1 deletion resources/jobs/release/create-release-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ jobs:
- job:
displayName: Create release tags
pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04
steps:
- template: setup-host.yml
parameters:
Expand Down
8 changes: 4 additions & 4 deletions resources/jobs/release/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ parameters:
default: true
- name: artifacts
type: object
default: [ "sdist", "wheels-windows-2022", "wheels-macos-11", "wheels-ubuntu-20.04" ]
default: [ "sdist", "wheels-windows-2022", "wheels-macos-11", "wheels-ubuntu-22.04" ]

jobs:
- job:
displayName: Publish artifacts to PyPI
pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04
steps:
- task: UsePythonVersion@0
displayName: Use python 3.8
displayName: Use python 3.10
inputs:
versionSpec: 3.8
versionSpec: "3.10"

- script: pip install twine

Expand Down
2 changes: 1 addition & 1 deletion resources/jobs/release/publish-release-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- job:
displayName: Publish release commits
pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04
steps:
- template: setup-host.yml
parameters:
Expand Down
4 changes: 2 additions & 2 deletions resources/jobs/release/setup-host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ steps:

- ${{ if eq(parameters.python, 'python') }}:
- task: UsePythonVersion@0
displayName: Use python 3.8
displayName: Use python 3.10
inputs:
versionSpec: 3.8
versionSpec: "3.10"

- ${{ if parameters.git }}:
- bash: scripts/setup_git.sh
Expand Down
10 changes: 5 additions & 5 deletions resources/jobs/release/verify.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
- name: pools
type: object
default: [ "ubuntu-20.04", "windows-2022", "macos-11" ]
default: [ "ubuntu-22.04", "windows-2022", "macos-11" ]

jobs:
- ${{ each pool in parameters.pools }}:
Expand All @@ -20,15 +20,15 @@ jobs:

- task: DownloadPipelineArtifact@2
displayName: Download artifact wheels-${{ pool }}
condition: not(eq('${{ pool }}', 'ubuntu-20.04'))
condition: not(eq('${{ pool }}', 'ubuntu-22.04'))
inputs:
artifactName: wheels-ubuntu-20.04
targetPath: wheels-ubuntu-20.04
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-20.04"
export PIP_FIND_LINKS="wheels-${{ pool }} wheels-ubuntu-22.04"
pip install wheels-${{ pool }}/*.whl
displayName: Test wheel install
Expand Down

0 comments on commit 5e940c0

Please sign in to comment.