Compare commits
No commits in common. "8c3649f691370f7d6b3d7ac998e2bc24be742b0c" and "80d01833918672abbf83f3bac560c7b7bd0d2aa8" have entirely different histories.
8c3649f691
...
80d0183391
52
.drone.yml
52
.drone.yml
@ -1,52 +0,0 @@
|
|||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: build
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: build-image
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
repo: t3hn3rd/asuro-build
|
|
||||||
tags: latest
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
registry: docker.io
|
|
||||||
username:
|
|
||||||
from_secret: docker_username
|
|
||||||
password:
|
|
||||||
from_secret: docker_password
|
|
||||||
|
|
||||||
- name: compile
|
|
||||||
image: t3hn3rd/asuro-build:latest
|
|
||||||
depends_on:
|
|
||||||
- build-image
|
|
||||||
commands:
|
|
||||||
- git fetch --tags
|
|
||||||
- find . -type f -print0 | xargs -0 dos2unix
|
|
||||||
- chmod +x /drone/src/*.sh
|
|
||||||
- /drone/src/compile.sh
|
|
||||||
|
|
||||||
- name: upload-iso-artifact
|
|
||||||
image: alpine/git
|
|
||||||
depends_on:
|
|
||||||
- compile
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- master
|
|
||||||
environment:
|
|
||||||
GITEA_TOKEN:
|
|
||||||
from_secret: gitea_token
|
|
||||||
commands:
|
|
||||||
- apk add --no-cache curl
|
|
||||||
- chmod +w Asuro.iso
|
|
||||||
- cp Asuro.iso "Asuro-$(git rev-parse --short HEAD).iso"
|
|
||||||
- echo "Uploading Asuro-$(git rev-parse --short HEAD).iso to Gitea Packages..."
|
|
||||||
- |
|
|
||||||
curl -X PUT "https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/$(git rev-parse --short HEAD)/Asuro.iso" \
|
|
||||||
-H "Authorization: token $GITEA_TOKEN" --upload-file "Asuro-$(git rev-parse --short HEAD).iso"
|
|
||||||
- echo "Updating latest ISO reference..."
|
|
||||||
- |
|
|
||||||
curl -X DELETE https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/latest/Asuro.iso \
|
|
||||||
-H "Authorization: token $GITEA_TOKEN" || echo "No previous latest version found."
|
|
||||||
- |
|
|
||||||
curl -X PUT https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/latest/Asuro.iso \
|
|
||||||
-H "Authorization: token $GITEA_TOKEN" --upload-file "Asuro-$(git rev-parse --short HEAD).iso"
|
|
73
.gitlab-ci.yml
Normal file
73
.gitlab-ci.yml
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
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 chmod +x /usr/bin/semver
|
RUN mkdir /code && 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,30 +20,26 @@ runOrFail() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
declare -a run_steps=(
|
runOrFail $(pwd)/compile_stub.sh "Failed to compile stub!"
|
||||||
"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!"
|
|
||||||
)
|
|
||||||
|
|
||||||
for ((i=0; i<${#run_steps[@]}; i+=2))
|
#Generate .pas with versioning headers.
|
||||||
do
|
runOrFail $(pwd)/compile_vergen.sh "Versions failed to compile"
|
||||||
if [ "$ERRCOUNT" -eq "0" ]
|
|
||||||
then
|
#Compile all .pas sources
|
||||||
script=$(pwd)/"${run_steps[$i]}"
|
runOrFail $(pwd)/compile_sources.sh "Failed to compile FPC Sources!"
|
||||||
message="${run_steps[$i+1]}"
|
|
||||||
runOrFail "$script" "$message"
|
#Link into a binary.
|
||||||
fi
|
runOrFail $(pwd)/compile_link.sh "Failed linking!"
|
||||||
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