Skip to content

Commit

Permalink
Add support for mintelf toolchains
Browse files Browse the repository at this point in the history
  • Loading branch information
th-otto committed Apr 30, 2024
1 parent 12518e8 commit cc67e87
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 13 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
cross_tool: [ "m68k-atari-mint" ]
cross_tool: [ "m68k-atari-mint", "m68k-atari-mintelf" ]
steps:
- uses: actions/checkout@v4
- name: Install SSH keys
Expand All @@ -28,8 +29,6 @@ jobs:
run: |
SYSROOT_DIR="/" ./.scripts/install-freemint.sh binutils gcc mintbin
- name: build
env:
CROSS_TOOL: ${{ matrix.cross_tool }}
run: ./.scripts/build.sh
- name: deploy
if: ${{ github.event_name == 'push' }}
Expand Down
5 changes: 0 additions & 5 deletions .scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
# -u: Treat unset variables as an error when substituting.
# -x: Display expanded script commands

if test "$CROSS_TOOL" = ""; then
CROSS_TOOL=m68k-atari-mint
export CROSS_TOOL
fi

make SHELL=/bin/bash
make SHELL=/bin/bash DESTDIR="${INSTALL_DIR}" install

Expand Down
9 changes: 6 additions & 3 deletions .scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ then
DEPLOY_ARCHIVE="zip"
fi

toolsuffix=${CROSS_TOOL##*-}

ARCHIVE_NAME="${PROJECT_NAME}-${PROJECT_VERSION}-${SHORT_ID}"
ARCHIVE_PATH="${DEPLOY_DIR}/${ARCHIVE_NAME}.${DEPLOY_ARCHIVE}"
ARCHIVE_PATH="${DEPLOY_DIR}/${ARCHIVE_NAME}-${toolsuffix}.${DEPLOY_ARCHIVE}"

mkdir -p "${DEPLOY_DIR}"

Expand Down Expand Up @@ -62,12 +64,13 @@ link_file() {
exit 1
}

for f in "" -000 -020 -v4e; do
upload_file "${DEPLOY_DIR}/${ARCHIVE_NAME}-${toolsuffix}.${DEPLOY_ARCHIVE}" "${UPLOAD_DIR}/${PROJECT_DIR}/${ARCHIVE_NAME}-${toolsuffix}.${DEPLOY_ARCHIVE}"
for f in -000 -020 -v4e; do
upload_file "${DEPLOY_DIR}/${ARCHIVE_NAME}${f}.${DEPLOY_ARCHIVE}" "${UPLOAD_DIR}/${PROJECT_DIR}/${ARCHIVE_NAME}${f}.${DEPLOY_ARCHIVE}"
done
if test -z "${CPU_TARGET}"
then
link_file "${ARCHIVE_NAME}.${DEPLOY_ARCHIVE}" "${PROJECT_DIR}-latest.${DEPLOY_ARCHIVE}"
link_file "${ARCHIVE_NAME}-${toolsuffix}.${DEPLOY_ARCHIVE}" "${PROJECT_DIR}-${toolsuffix}-latest.${DEPLOY_ARCHIVE}"
fi

echo ${PROJECT_NAME}-${PROJECT_VERSION}-${SHORT_ID} > .latest_version
Expand Down
15 changes: 13 additions & 2 deletions .scripts/install-freemint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,22 @@
# -x: Display expanded script commands

DOWNLOAD_DIR=http://tho-otto.de/snapshots
SYSROOT_DIR=${SYSROOT_DIR:-"/usr/m68k-atari-mint/sys-root/usr"}
SYSROOT_DIR=${SYSROOT_DIR:-"/usr/${CROSS_TOOL}/sys-root"}

sudo mkdir -p "${SYSROOT_DIR}" && cd "${SYSROOT_DIR}"

toolsuffix=${CROSS_TOOL##*-}

for package in $*
do
wget -q -O - "$DOWNLOAD_DIR/${package}/${package}-latest.tar.bz2" | sudo tar xjf -
# for gcc and binutils, use stable current, not experimental latest build
case $package in
gcc | binutils)
filename=${package}-${toolsuffix}-current.tar.bz2
;;
*)
filename=${package}-${toolsuffix}-latest.tar.bz2
;;
esac
wget -q -O - "$DOWNLOAD_DIR/${package}/${filename}" | sudo tar xjf -
done
2 changes: 2 additions & 0 deletions .scripts/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ BRANCH=$(echo "${GITHUB_REF}" | cut -d '/' -f 3)
if test "$CPU_TARGET" != ""; then
echo "CPU_TARGET=$CPU_TARGET" >> $GITHUB_ENV
fi
CROSS_TOOL=${CROSS_TOOL:-m68k-atari-mint}
echo "CROSS_TOOL=$CROSS_TOOL" >> $GITHUB_ENV

# GITHUB_HEAD_REF is only set for pull requests
if [ "${GITHUB_HEAD_REF}" = "" ]
Expand Down

0 comments on commit cc67e87

Please sign in to comment.