Merge pull request 'feature/ci-cd-drone-migration' (#3) from feature/ci-cd-drone-migration into develop
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #3
This commit is contained in:
parent
0e2c6b2936
commit
8be364c990
@ -1,73 +0,0 @@
|
|||||||
stages:
|
|
||||||
- Compile Versions
|
|
||||||
- Compile Sources
|
|
||||||
- Link
|
|
||||||
- Generate Documentation
|
|
||||||
- Deploy
|
|
||||||
|
|
||||||
cache:
|
|
||||||
- key: ${CI_COMMIT_REF_SLUG}
|
|
||||||
paths:
|
|
||||||
- lib/*.o
|
|
||||||
- bin/kernel.bin
|
|
||||||
- doc
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- chmod +x *.sh
|
|
||||||
|
|
||||||
versions:
|
|
||||||
stage: Compile Versions
|
|
||||||
script:
|
|
||||||
- ./compile_vergen.sh
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- release/*.svg
|
|
||||||
- src/include/asuro.pas
|
|
||||||
|
|
||||||
compile_sources:
|
|
||||||
stage: Compile Sources
|
|
||||||
script:
|
|
||||||
- rm -f lib/*.so
|
|
||||||
- ./compile_sources.sh
|
|
||||||
needs:
|
|
||||||
- versions
|
|
||||||
|
|
||||||
link:
|
|
||||||
stage: Link
|
|
||||||
script:
|
|
||||||
- ./compile_stub.sh
|
|
||||||
- ./compile_link.sh
|
|
||||||
needs:
|
|
||||||
- versions
|
|
||||||
- compile_sources
|
|
||||||
|
|
||||||
isogen:
|
|
||||||
stage: Deploy
|
|
||||||
script:
|
|
||||||
- ./compile_isogen.sh
|
|
||||||
- ./compile_sumgen.sh
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- ./Asuro.iso
|
|
||||||
- ./release/checksum.svg
|
|
||||||
needs:
|
|
||||||
- link
|
|
||||||
|
|
||||||
docgen:
|
|
||||||
stage: Generate Documentation
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
script:
|
|
||||||
- ./compile_sourcelist.sh
|
|
||||||
- ./compile_docs.sh
|
|
||||||
# Remove comments when we want to use gitlab pages.
|
|
||||||
#- cp doc public
|
|
||||||
allow_failure: true
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- doc
|
|
||||||
#- public/*
|
|
||||||
#- ./sources.list
|
|
||||||
needs:
|
|
||||||
- versions
|
|
@ -16,7 +16,7 @@ RUN curl -sL https://sourceforge.net/projects/freepascal/files/Linux/$FPC_VERSIO
|
|||||||
|
|
||||||
COPY compile.sh /compile.sh
|
COPY compile.sh /compile.sh
|
||||||
ADD https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver /usr/bin/semver
|
ADD https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver /usr/bin/semver
|
||||||
RUN mkdir /code && chmod +x /usr/bin/semver
|
RUN chmod +x /usr/bin/semver
|
||||||
WORKDIR /code
|
WORKDIR /code
|
||||||
RUN find . -type f -print0 | xargs -0 dos2unix
|
RUN find . -type f -print0 | xargs -0 dos2unix
|
||||||
ENTRYPOINT ["/bin/bash", "-c"]
|
ENTRYPOINT ["/bin/bash", "-c"]
|
||||||
|
32
compile.sh
32
compile.sh
@ -20,26 +20,30 @@ runOrFail() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
runOrFail $(pwd)/compile_stub.sh "Failed to compile stub!"
|
declare -a run_steps=(
|
||||||
|
"compile_stub.sh" "Failed to compile stub!"
|
||||||
|
"compile_vergen.sh" "Versions failed to compile"
|
||||||
|
"compile_sources.sh" "Failed to compile FPC Sources!"
|
||||||
|
"compile_link.sh" "Failed linking!"
|
||||||
|
"compile_isogen.sh" "Failed to create ISO!"
|
||||||
|
)
|
||||||
|
|
||||||
#Generate .pas with versioning headers.
|
for ((i=0; i<${#run_steps[@]}; i+=2))
|
||||||
runOrFail $(pwd)/compile_vergen.sh "Versions failed to compile"
|
do
|
||||||
|
if [ "$ERRCOUNT" -eq "0" ]
|
||||||
#Compile all .pas sources
|
then
|
||||||
runOrFail $(pwd)/compile_sources.sh "Failed to compile FPC Sources!"
|
script=$(pwd)/"${run_steps[$i]}"
|
||||||
|
message="${run_steps[$i+1]}"
|
||||||
#Link into a binary.
|
runOrFail "$script" "$message"
|
||||||
runOrFail $(pwd)/compile_link.sh "Failed linking!"
|
fi
|
||||||
|
done
|
||||||
#Generate an ISO with GRUB as the Bootloader.
|
|
||||||
runOrFail ./compile_isogen.sh "Failed to create ISO!"
|
|
||||||
|
|
||||||
#Call generate final artifacts based on failure or success of the above.
|
#Call generate final artifacts based on failure or success of the above.
|
||||||
if [ "$ERRCOUNT" -ne "0" ]
|
if [ "$ERRCOUNT" -ne "0" ]
|
||||||
then
|
then
|
||||||
./compile_finish.sh "failed"
|
. ./compile_finish.sh "failed"
|
||||||
else
|
else
|
||||||
./compile_finish.sh "success"
|
. ./compile_finish.sh "success"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ..
|
cd ..
|
Loading…
x
Reference in New Issue
Block a user