Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add entry to build.txt #187

Merged
merged 2 commits into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}"
Loading