Skip to content

Commit 5b13ee0

Browse files
AndrewQuijanolacraig2
authored andcommitted
Hot fix on deployment fix for LLVM-14 PANDA
1 parent a4f9286 commit 5b13ee0

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

.github/workflows/publish_docker.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- stable
88

99
env:
10-
PANDA_CONTAINER_UBUNTU_VERSION: '20.04'
10+
PANDA_CONTAINER_UBUNTU_VERSION: '22.04'
1111

1212
jobs:
1313
get_version:
@@ -110,7 +110,6 @@ jobs:
110110
strategy:
111111
matrix:
112112
ubuntu_version:
113-
- 20.04
114113
- 22.04
115114

116115
steps:
@@ -132,7 +131,6 @@ jobs:
132131
[registry."${{ secrets.PANDA_ARC_REGISTRY }}"]
133132
insecure = true
134133
http = true
135-
136134
137135
- name: Trust Harbor's self-signed certificate
138136
run: |
@@ -170,15 +168,14 @@ jobs:
170168
docker run --rm -v $(pwd):/out packager bash -c "cp /*.whl /pandare.deb /out"
171169
mv pandare.deb pandare_${{ matrix.ubuntu_version }}.deb
172170
- name: Upload deb packages as artifacts
173-
if: ${{ matrix.ubuntu_version != env.PANDA_CONTAINER_UBUNTU_VERSION }}
174171
uses: actions/upload-artifact@v4
175172
with:
176173
name: pandare_${{ matrix.ubuntu_version }}
177174
path: panda/debian/pandare*.deb
178175
if-no-files-found: error
179176

180177
- name: Upload whl package as artifact
181-
if: ${{ matrix.ubuntu_version != env.PANDA_CONTAINER_UBUNTU_VERSION }}
178+
if: ${{ matrix.ubuntu_version == env.PANDA_CONTAINER_UBUNTU_VERSION }}
182179
uses: actions/upload-artifact@v4
183180
with:
184181
name: pypanda

Dockerfile

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ARG PACKAGE_VERSION="3.1.0"
99
### BASE IMAGE
1010
FROM ${REGISTRY}/$BASE_IMAGE AS base
1111
ARG BASE_IMAGE
12+
ARG CAPSTONE_VERSION
1213

1314
# Copy dependencies lists into container. We copy them all and then do a mv because
1415
# we need to transform base_image into a windows compatible filename which we can't
@@ -22,12 +23,6 @@ RUN apt-get -qq update && \
2223

2324
COPY ./panda/dependencies/${BASE_IMAGE/:/_}_build.txt /tmp/build_dep.txt
2425

25-
### BUILD IMAGE - STAGE 2
26-
FROM base AS builder
27-
ARG BASE_IMAGE
28-
ARG TARGET_LIST
29-
ARG CAPSTONE_VERSION
30-
3126
RUN apt-get -qq update && \
3227
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends $(cat /tmp/build_dep.txt | grep -o '^[^#]*') && \
3328
apt-get clean && \
@@ -52,6 +47,10 @@ RUN cd /tmp && \
5247
dpkg -i /tmp/libosi_${BASE_IMAGE_VERSION}.deb && \
5348
rm -rf /tmp/libosi_${BASE_IMAGE_VERSION}.deb
5449

50+
### BUILD IMAGE - STAGE 2
51+
FROM base AS builder
52+
ARG TARGET_LIST
53+
5554
# Build and install panda
5655
# Copy repo root directory to /panda, note we explicitly copy in .git directory
5756
# Note .dockerignore file keeps us from copying things we don't need
@@ -76,7 +75,7 @@ RUN git -C /panda submodule update --init dtc && \
7675
--prefix=/usr/local \
7776
--disable-numa \
7877
--enable-llvm && \
79-
rm -rf /panda/.git
78+
rm -rf /panda/.git
8079

8180
RUN PRETEND_VERSION=$(cat /tmp/savedversion) make -C /panda/build -j "$(nproc)"
8281

@@ -107,9 +106,6 @@ RUN cd /panda/panda/python/core && \
107106
python3 create_panda_datatypes.py --install && \
108107
PRETEND_VERSION=$(cat /tmp/savedversion) python3 -m build --wheel . && \
109108
PRETEND_VERSION=$(cat /tmp/savedversion) pip install .
110-
RUN python3 -m pip install --upgrade pip "setuptools<65.6.0" && \
111-
python3 -m pip install "pycparser<2.22" && \
112-
python3 -m pip install --force-reinstall --no-binary :all: cffi
113109

114110
# BUG: PANDA sometimes fails to generate all the necessary files for PyPANDA. This is a temporary fix to detect and fail when this occurs
115111
RUN ls -alt $(pip show pandare | grep Location: | awk '{print $2}')/pandare/autogen/
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
pyelftools==0.27
2-
capstone==4.0.1

0 commit comments

Comments
 (0)