Skip to content

Commit

Permalink
Merge pull request #187 from sharkwouter/master
Browse files Browse the repository at this point in the history
Add entry to build.txt
  • Loading branch information
wally4000 authored Jun 16, 2024
2 parents 31a5e52 + 39ec01c commit 2bf4355
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ jobs:
]
fail-fast: false
steps:
- uses: actions/checkout@v4

- name: Install dependencies Alpine
if: matrix.os[0] == 'alpine'
run: |
Expand All @@ -33,8 +31,11 @@ jobs:
libarchive-devel openssl-devel gpgme-devel libtool gettext texinfo bison flex gmp-devel mpfr-devel libmpc-devel ncurses-devel \
diffutils glibc-gconv-extra xz
- uses: actions/checkout@v4

- name: Compile Tools
run: |
chown -R $(id -nu):$(id -ng) .
export PSPDEV=$PWD/pspdev
export PATH=$PATH:$PSPDEV/bin
./toolchain.sh
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:

- uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}:latest
build-args: |
Expand Down
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,23 @@ ARG BASE_DOCKER_EXTRA_IMAGE
# Allegrex stage of Dockerfile
FROM $BASE_DOCKER_ALLEGREX_IMAGE

RUN mv ${PSPDEV}/build.txt ${PSPDEV}/build0.txt

# Extra stage of Dockerfile
FROM $BASE_DOCKER_EXTRA_IMAGE

RUN mv ${PSPDEV}/build.txt ${PSPDEV}/build1.txt

# Second stage of Dockerfile
FROM alpine:latest

ENV PSPDEV /usr/local/pspdev
ENV PATH $PATH:${PSPDEV}/bin

COPY --from=0 ${PSPDEV} ${PSPDEV}
COPY --from=1 ${PSPDEV} ${PSPDEV}
COPY --from=1 ${PSPDEV} ${PSPDEV}

RUN cat ${PSPDEV}/build0.txt ${PSPDEV}/build1.txt > ${PSPDEV}/build.txt && \
rm ${PSPDEV}/build0.txt ${PSPDEV}/build1.txt && \
apk add --no-cache git && \
git log -1 --format="psptoolchain %H %cs" >> ${PSPDEV}/build.txt
7 changes: 7 additions & 0 deletions toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,10 @@ else
for SCRIPT in ${BUILD_SCRIPTS[@]}; do "$SCRIPT" "$TAG" || { echo "$SCRIPT: Failed."; exit 1; } done

fi

## Store build information
BUILD_FILE="${PSPDEV}/build.txt"
if [[ -f "${BUILD_FILE}" ]]; then
sed -i='' '/^psptoolchain /d' "${BUILD_FILE}"
fi
git log -1 --format="psptoolchain %H %cs %s" >> "${BUILD_FILE}"

0 comments on commit 2bf4355

Please sign in to comment.