1
0
mirror of https://github.com/AmigaPorts/docker-amiga-gcc.git synced 2025-11-19 16:22:32 +00:00

Merge branch 'master' of github.com:AmigaPorts/docker-amiga-gcc

This commit is contained in:
Marlon
2023-09-21 22:14:53 +02:00
7 changed files with 475 additions and 682 deletions

84
.gitattributes vendored Normal file
View File

@ -0,0 +1,84 @@
# Common settings that generally should always be used with your language specific settings
# Auto detect text files and perform LF normalization
* text=auto
#
# The above will handle all files NOT found below
#
# Documents
*.bibtex text diff=bibtex
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.md text diff=markdown
*.mdx text diff=markdown
*.tex text diff=tex
*.adoc text
*.textile text
*.mustache text
*.csv text eol=crlf
*.tab text
*.tsv text
*.txt text
*.sql text
*.epub diff=astextplain
# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
# SVG treated as text by default.
*.svg text
# If you want to treat it as binary,
# use the following line instead.
# *.svg binary
*.eps binary
# Scripts
*.bash text eol=lf
Dockerfile text eol=lf
*.fish text eol=lf
*.sh text eol=lf
*.zsh text eol=lf
# These are explicitly windows files and should use crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
# Serialisation
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text
# Archives
*.7z binary
*.gz binary
*.tar binary
*.tgz binary
*.zip binary
# Text files where line endings should be preserved
*.patch -text
#
# Exclude files from exporting
#
.gitattributes export-ignore
.gitignore export-ignore
.gitkeep export-ignore

View File

@ -7,15 +7,16 @@ FROM amigadev/docker-base:latest
ARG BUILD_OS
ARG BUILD_PFX
ARG PREFIX
ENV CROSS_PFX $BUILD_PFX
ENV CROSS_PFX $PREFIX
ENV OS_NAME $BUILD_OS
COPY --from=build-env /opt/${CROSS_PFX} /opt/${CROSS_PFX}
# START COMMON
MAINTAINER Marlon Beijer "marlon@amigadev.com"
RUN apt update && apt install -y libtool automake autoconf && apt autoremove -y
RUN apt update && apt install -y libtool automake autoconf && apt -y full-upgrade && apt autoremove -y
RUN echo ${CROSS_PFX}
RUN echo "root:root" | chpasswd
RUN ln -s /opt/${CROSS_PFX} /tools
@ -44,6 +45,7 @@ RUN ln -sf ${CROSS_ROOT}/bin/${CROSS_PFX}-as /usr/bin/as && \
COPY dependencies/toolchains/${CROSS_PFX}.cmake ${CROSS_ROOT}/lib/
COPY dependencies/toolchains/Modules/${CROSS_PFX} /CMakeModules
RUN cmake --version
RUN mv -fv /CMakeModules/* /usr/share/cmake-`cmake --version|awk '{ print $3;exit }'|awk -F. '{print $1"."$2}'`/Modules/
RUN ln -s /usr/share/cmake-`cmake --version|awk '{ print $3;exit }'|awk -F. '{print $1"."$2}'`/Modules/Platform/Generic.cmake /usr/share/cmake-`cmake --version|awk '{ print $3;exit }'|awk -F. '{print $1"."$2}'`/Modules/Platform/${OS_NAME}.cmake
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/lib/${CROSS_PFX}.cmake

View File

@ -4,6 +4,7 @@
"DockerRoot": "amigadev",
"DockerImage": "crosstools",
"DockerTag": "m68k-amigaos",
"Prefix": "",
"Dockerfile": "Dockerfile",
"BuildIfSuccessful": "",
"BuildParam": "AmigaOS"
@ -12,6 +13,7 @@
"DockerRoot": "amigadev",
"DockerImage": "crosstools",
"DockerTag": "m68k-amigaos-gcc10",
"Prefix": "m68k-amigaos",
"Dockerfile": "Dockerfile",
"BuildIfSuccessful": "",
"BuildParam": "AmigaOS"
@ -20,6 +22,7 @@
"DockerRoot": "amigadev",
"DockerImage": "crosstools",
"DockerTag": "ppc-amigaos",
"Prefix": "",
"Dockerfile": "Dockerfile",
"BuildIfSuccessful": "",
"BuildParam": "AmigaOS"
@ -29,6 +32,7 @@
"DockerRoot": "amigadev",
"DockerImage": "crosstools",
"DockerTag": "ppc-morphos",
"Prefix": "",
"Dockerfile": "Dockerfile",
"BuildIfSuccessful": "",
"BuildParam": "MorphOS"

12
Jenkinsfile vendored
View File

@ -38,7 +38,7 @@ def killall_jobs() {
echo "Done killing";
}
def buildStep(DOCKER_ROOT, DOCKERIMAGE, DOCKERTAG, DOCKERFILE, BUILD_NEXT, BUILD_OS) {
def buildStep(DOCKER_ROOT, DOCKERIMAGE, DOCKERTAG, DOCKERFILE, BUILD_NEXT, BUILD_OS, PREFIX) {
def fixed_job_name = env.JOB_NAME.replace('%2F','/');
try {
sh "rm -rfv ./*"
@ -56,10 +56,14 @@ def buildStep(DOCKER_ROOT, DOCKERIMAGE, DOCKERTAG, DOCKERFILE, BUILD_NEXT, BUILD
throw new Exception("Invalid branch, stopping build!");
}
if (PREFIX.equals('')) {
PREFIX = "${tag}";
}
docker.withRegistry("https://index.docker.io/v1/", "dockerhub") {
def customImage
stage("Building ${DOCKERIMAGE}:${tag}...") {
customImage = docker.build("${DOCKER_ROOT}/${DOCKERIMAGE}:${tag}", "--build-arg BUILDENV=${buildenv} --build-arg BUILD_OS=${BUILD_OS} --build-arg BUILD_PFX=${tag} --network=host --pull -f ${DOCKERFILE} .");
customImage = docker.build("${DOCKER_ROOT}/${DOCKERIMAGE}:${tag}", "--build-arg BUILDENV=${buildenv} --build-arg BUILD_OS=${BUILD_OS} --build-arg BUILD_PFX=${tag} --build-arg PREFIX=${PREFIX} --network=host --pull -f ${DOCKERFILE} .");
}
stage("Pushing to docker hub registry...") {
@ -98,7 +102,7 @@ node('master') {
project.builds.each { v ->
branches["Build ${v.DockerRoot}/${v.DockerImage}:${v.DockerTag}"] = {
node {
buildStep(v.DockerRoot, v.DockerImage, v.DockerTag, v.Dockerfile, v.BuildIfSuccessful, v.BuildParam);
buildStep(v.DockerRoot, v.DockerImage, v.DockerTag, v.Dockerfile, v.BuildIfSuccessful, v.BuildParam, v.Prefix);
}
}
}
@ -108,7 +112,7 @@ node('master') {
if ("${v.DockerTag}".equals("${BUILD_IMAGE}")) {
branches["Build ${v.DockerRoot}/${v.DockerImage}:${v.DockerTag}"] = {
node {
buildStep(v.DockerRoot, v.DockerImage, v.DockerTag, v.Dockerfile, v.BuildIfSuccessful, v.BuildParam);
buildStep(v.DockerRoot, v.DockerImage, v.DockerTag, v.Dockerfile, v.BuildIfSuccessful, v.BuildParam, v.Prefix);
}
}
}

1047
LICENSE

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@ set -e
export TARGET='m68k-amigaos-gcc10'
export SYSROOT=/opt/${TARGET}/usr
export M68K_CPU="-m68040 -mhard-float"
export M68K_COMMON="-s -ffast-math -fomit-frame-pointer -noixemul"
export M68K_COMMON="-s -ffast-math -fomit-frame-pointer"
export M68K_CFLAGS="${CFLAGS} ${M68K_CPU} ${M68K_COMMON}"
export M68K_CXXFLAGS="${CXXFLAGS} ${M68K_CPU} ${M68K_COMMON}"
export CURPATH="${PWD}"