From 747e7ffc5d0c75dc9267cdb753c940a91eeba800 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Mon, 24 Jun 2024 13:48:13 -0700 Subject: [PATCH] Add rust toolchain (#51) * Add rust toolchain * Build images in PRs * Install curl * Add some quotes * Fix the rust installation --- .github/workflows/publish-ci-image.yml | 2 ++ ci-image/Dockerfile | 4 +++- ci-image/conf/install.sh.template | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-ci-image.yml b/.github/workflows/publish-ci-image.yml index f236355..0f922c1 100644 --- a/.github/workflows/publish-ci-image.yml +++ b/.github/workflows/publish-ci-image.yml @@ -3,6 +3,7 @@ name: Publish angr ci docker image on: push: branches: ["master"] + pull_request: workflow_dispatch: jobs: @@ -21,3 +22,4 @@ jobs: DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }} - name: Push ci image run: docker push angr/ci:3 + if: github.event_name != 'pull_request' diff --git a/ci-image/Dockerfile b/ci-image/Dockerfile index d560a83..9f47949 100644 --- a/ci-image/Dockerfile +++ b/ci-image/Dockerfile @@ -16,7 +16,9 @@ RUN apt-get install -y strace RUN apt-get install -y fontconfig RUN apt-get install -y gcc-multilib g++-multilib RUN apt-get install -y libxkbcommon-dev libegl-dev -RUN apt-get install -y zstd +RUN apt-get install -y zstd curl +RUN bash -c "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile minimal -y" +ENV PATH=/root/.cargo/bin:$PATH RUN pip3 install "virtualenv<20" pygithub # fix missing libreadline.so.7 diff --git a/ci-image/conf/install.sh.template b/ci-image/conf/install.sh.template index aa3bb1b..b383b1b 100644 --- a/ci-image/conf/install.sh.template +++ b/ci-image/conf/install.sh.template @@ -9,7 +9,7 @@ cp $CONF/nose2.cfg . python3 -mvirtualenv --python=`which python3` ./virtualenv source ./virtualenv/bin/activate -pip install -U 'pip==21.3.1' 'setuptools<64' +pip install -U 'pip==21.3.1' 'setuptools<64' maturin pip install --requirement ./requirements.txt --no-cache --src ./src --no-build-isolation pip freeze > freeze.txt