Skip to content

Commit

Permalink
fix target arch at linux
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Oct 9, 2023
1 parent 0e28c8a commit d350588
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 27 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
}
},
"remoteEnv": {
"DISPLAY": "${localEnv:DISPLAY}"
"DISPLAY": "${localEnv:DISPLAY}",
"PIP_OPTIONS": "--upgrade pip"
},
"customizations": {
"vscode": {
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,25 @@ jobs:
with:
# Need this to get version number from last tag
fetch-depth: 0

- name: Install python packages
uses: ./.github/actions/install_requirements
with:
python_version: ${{ matrix.python }}
requirements_file: requirements-test-${{ matrix.os }}-${{ matrix.python }}.txt
install_options: ${{ matrix.install }}

- name: List dependency tree
run: pipdeptree

- name: Run tests
run: pytest

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
name: ${{ matrix.python }}/${{ matrix.os }}
files: cov.xml
# TODO TEMPORARY CHANGE TO TEST container CI
# - name: Install python packages
# uses: ./.github/actions/install_requirements
# with:
# python_version: ${{ matrix.python }}
# requirements_file: requirements-test-${{ matrix.os }}-${{ matrix.python }}.txt
# install_options: ${{ matrix.install }}

# - name: List dependency tree
# run: pipdeptree

# - name: Run tests
# run: pytest

# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# name: ${{ matrix.python }}/${{ matrix.os }}
# files: cov.xml

dist:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
Expand Down
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ ARG TARGET_ARCHITECTURE
ARG BASE=7.0.7ec2
ARG REGISTRY=ghcr.io/epics-containers

FROM ${REGISTRY}/epics-base-${TARGET_ARCHITECTURE}-developer:${BASE} AS developer
FROM ${REGISTRY}/epics-base-linux-developer:${BASE} AS developer
ARG PIP_OPTIONS

COPY . /epics/ioc-PandABlocks
WORKDIR /epics/ioc-PandABlocks
RUN pip install --upgrade pip && \
pip install .
# Copy any required context for the pip install over
COPY . /context
WORKDIR /context

# install python package into /venv
RUN pip install ${PIP_OPTIONS}

##### runtime preparation stage ################################################

Expand All @@ -20,11 +23,11 @@ RUN ibek ioc extract-runtime-assets /assets --no-defaults --extras /venv

##### runtime stage ############################################################

FROM ${REGISTRY}/epics-base-${TARGET_ARCHITECTURE}-runtime:${BASE} AS runtime
FROM ${REGISTRY}/epics-base-linux-runtime:${BASE} AS runtime

# get runtime assets from the preparation stage
COPY --from=runtime_prep /assets /

ENV TARGET_ARCHITECTURE ${TARGET_ARCHITECTURE}
ENV TARGET_ARCHITECTURE linux

ENTRYPOINT ["/bin/bash"]

0 comments on commit d350588

Please sign in to comment.