diff --git a/.cicada/compose/base/Dockerfile b/.cicada/compose/base/Dockerfile deleted file mode 100644 index 0be3cc1d..00000000 --- a/.cicada/compose/base/Dockerfile +++ /dev/null @@ -1,64 +0,0 @@ -FROM ubuntu:kinetic - -ARG MOUNT_DIRECTORY=/app - -ENV DEBIAN_FRONTEND=noninteractive - -RUN apt-get update -y --fix-missing -RUN apt-get install -qy apt-utils -RUN apt-get install -qy curl -RUN apt-get install -qy valgrind -RUN apt-get install -qy xz-utils - -# Install gcc backend -RUN apt-get install -qy gcc-12 - -# Install clang backend -RUN apt-get install -qy clang-11 - -# Install WASI -WORKDIR /wasi -RUN curl -O https://raw.githubusercontent.com/ExoKomodo/Daybreak/main/deps/wasi-sysroot-16.0.tar.gz -RUN tar -xf wasi-sysroot-16.0.tar.gz -RUN rm wasi-sysroot-16.0.tar.gz -WORKDIR / - -# Install wasmtime -RUN curl https://wasmtime.dev/install.sh -sSf | bash -ENV PATH="${HOME}/.wasmtime/bin:${PATH}" - -# Install zig backend -ARG ARCH=x86_64 -ARG ZIG_VERSION=0.9.1 -ARG ZIG_DIR=/zig-linux-${ARCH}-${ZIG_VERSION} -ARG ZIG_TARBALL=${ZIG_DIR}.tar.xz - -RUN curl -O https://ziglang.org/download/${ZIG_VERSION}${ZIG_TARBALL} -RUN tar -xf ${ZIG_TARBALL} -RUN rm ${ZIG_TARBALL} -RUN echo "${ZIG_DIR}/zig cc \$@" > /usr/bin/zig -RUN chmod +x /usr/bin/zig - -# Create zig-wasi backend -RUN echo "${ZIG_DIR}/zig cc --target=wasm32-wasi --sysroot /wasi/wasi-sysroot-16.0 \$@" > /usr/bin/zig-wasi -RUN chmod +x /usr/bin/zig-wasi - -# Register backends -RUN update-alternatives --install /usr/bin/gcc gcc $(which gcc-12) 5 -RUN update-alternatives --install /usr/bin/cc cc $(which gcc) 4 -RUN update-alternatives --install /usr/bin/clang clang $(which clang-11) 3 -RUN update-alternatives --install /usr/bin/cc cc $(which clang) 2 -RUN update-alternatives --install /usr/bin/cc cc $(which zig) 1 -RUN update-alternatives --install /usr/bin/cc cc $(which zig-wasi) 0 - -# Add jenkins user and group -ENV CICADA_JENKINS_USER=112 -ENV CICADA_JENKINS_GROUP=119 - -RUN groupadd -r -f -g ${CICADA_JENKINS_GROUP} jenkins -RUN useradd -r -u ${CICADA_JENKINS_USER} -g ${CICADA_JENKINS_GROUP} jenkins - -# Set env vars that have no dependent commands -ENV C_INCLUDE_PATH=${MOUNT_DIRECTORY}/src/include:${MOUNT_DIRECTORY}/tests/include - -WORKDIR ${MOUNT_DIRECTORY} diff --git a/.cicada/compose/base/Jenkinsfile b/.cicada/compose/base/Jenkinsfile deleted file mode 100644 index 0d5d4501..00000000 --- a/.cicada/compose/base/Jenkinsfile +++ /dev/null @@ -1,52 +0,0 @@ -def COMPOSE_ARGS = '--build --abort-on-container-exit' - -pipeline { - agent any - - options { - disableConcurrentBuilds() - ansiColor('xterm') - } - - environment { - DAYBREAK_BOOTSTRAP="./bootstrap/linux/daybreak" - DAYBREAK_OUT="./out" - DOCKER_BUILDKIT="1" - CICADA_PRD_BRANCH="main" - CICADA_REGISTRY_PASSWORD=credentials("docker-password") - CICADA_REGISTRY_USERNAME=credentials("docker-username") - CICADA_NAME="base" - CICADA_DOCKER_HUB_DEV_PROJECT = "development" - CICADA_DOCKER_HUB_PRD_PROJECT = "daybreak" - CICADA_DOCKER_HUB_USERNAME = "exokomodo" - } - - stages { - stage ("Docker Login") { - steps { - sh "bash ${CICADA_CI_DIR}/container_login.bash" - } - } - - stage ("Build") { - environment { - CC_COMPILER = "gcc" - } - steps { - sh "bash ${CICADA_CI_DIR}/container_build.bash" - } - } - - stage ("Push") { - steps { - sh "bash ${CICADA_CI_DIR}/container_push.bash" - } - } - } - - post { - cleanup { - sh "bash ${CICADA_CI_DIR}/cleanup.bash" - } - } -} diff --git a/.cicada/compose/daybreak/Dockerfile b/.cicada/compose/daybreak/Dockerfile deleted file mode 100644 index 0952801c..00000000 --- a/.cicada/compose/daybreak/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM exokomodo/development:211-cicada-base-latest - -RUN ln -s /app/bootstrap/linux/daybreak /usr/bin/daybreak diff --git a/.cicada/compose/daybreak/Jenkinsfile b/.cicada/compose/daybreak/Jenkinsfile deleted file mode 100644 index 715bf501..00000000 --- a/.cicada/compose/daybreak/Jenkinsfile +++ /dev/null @@ -1,133 +0,0 @@ -pipeline { - agent any - - options { - disableConcurrentBuilds() - ansiColor('xterm') - } - - environment { - DAYBREAK_BOOTSTRAP = './bootstrap/linux/daybreak' - DAYBREAK_OUT = './out' - CICADA_PRD_BRANCH = 'main' - CICADA_REGISTRY_PASSWORD = credentials('docker-password') - CICADA_REGISTRY_USERNAME = credentials('docker-username') - CICADA_NAME = 'daybreak' - - CICADA_DOCKER_HUB_DEV_PROJECT = 'development' - CICADA_DOCKER_HUB_PRD_PROJECT = 'daybreak' - CICADA_DOCKER_HUB_USERNAME = 'exokomodo' - } - - stages { - stage('docker login') { - steps { - sh "bash ${CICADA_CI_DIR}/container_login.bash" - } - } - - stage('gcc') { - environment { - CC_COMPILER = 'gcc' - } - stages { - stage('[gcc] Build Daybreak') { - steps { - sh "bash ${CICADA_COMPOSE} gcc-build build_daybreak" - } - } - - stage('[gcc] Test') { - steps { - sh "bash ${CICADA_COMPOSE} gcc-test test" - } - } - - stage('[gcc] Memory Check') { - steps { - sh "bash ${CICADA_COMPOSE} gcc-memcheck memory_check" - } - } - } - } - - stage('clang') { - environment { - CC_COMPILER = 'clang' - } - stages { - stage('[clang] Build Daybreak') { - steps { - sh "bash ${CICADA_COMPOSE} clang-build build_daybreak" - } - } - - stage('[clang] Test') { - steps { - sh "bash ${CICADA_COMPOSE} clang-test test" - } - } - - stage('[clang] Memory Check') { - steps { - sh "bash ${CICADA_COMPOSE} clang-memcheck memory_check" - } - } - } - } - - stage('zig') { - environment { - CC_COMPILER = 'zig' - } - stages { - stage('[zig] Build Daybreak') { - steps { - sh "env" - sh "bash ${CICADA_COMPOSE} zig-build build_daybreak" - } - } - - stage('[zig] Test') { - steps { - sh "bash ${CICADA_COMPOSE} zig-test test" - } - } - - stage('[zig] Memory Check') { - steps { - sh "bash ${CICADA_COMPOSE} zig-memcheck memory_check" - } - } - } - } - - stage('zig-wasi') { - environment { - CC_COMPILER = 'zig-wasi' - } - stages { - stage('[zig-wasi] Build Daybreak') { - steps { - sh "bash ${CICADA_COMPOSE} zig-wasi-build build_daybreak" - } - } - - stage('[zig-wasi] Test') { - steps { - sh "bash ${CICADA_COMPOSE} zig-wasi-test test" - } - } - } - } - } - - post { - always { - sh "bash ${CICADA_COMPOSE} fix fix_ownership" - } - cleanup { - sh "bash ${CICADA_CI_DIR}/cleanup.bash" - } - } -} diff --git a/.cicada/compose/devcontainer/Dockerfile b/.cicada/compose/devcontainer/Dockerfile deleted file mode 100644 index c20e0030..00000000 --- a/.cicada/compose/devcontainer/Dockerfile +++ /dev/null @@ -1,55 +0,0 @@ -FROM exokomodo/development:211-cicada-base-latest - -RUN apt-get update -y --fix-missing - -RUN apt-get install -qy less -RUN apt-get install -qy locales -RUN locale-gen en_US.UTF-8 -RUN apt-get install -qy neofetch - -# Install Docker and Docker Compose -RUN apt-get install -qy docker - -RUN LATEST_COMPOSE_VERSION=$(curl -sSL "https://api.github.com/repos/docker/compose/releases/latest" | grep -o -P '(?<="tag_name": ").+(?=")') -RUN curl -sSL "https://github.com/docker/compose/releases/download/${LATEST_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose -RUN chmod +x /usr/local/bin/docker-compose - -# Install git and configure it -RUN apt-get install -qy git -RUN touch ${HOME}/.gitconfig -RUN echo "\ -[alias] \n\ - co = checkout \n\ - cob = checkout -b \n\ - cp = cherry-pick \n\ - com = commit -m \n\ - st = status \n\ - pushup = !git push --set-upstream origin `git rev-parse --abbrev-ref HEAD` \n\ - br = branch \n\ - hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short \n\ - type = cat-file -t \n\ - dump = cat-file -p \n\ - rebi = rebase -i \n\ - del = branch -D \n\ -[branch] \n\ - autosetuprebase = always \n\ -[core] \n\ - editor = vim \n\ -[pull] \n\ - rebase = true \n\ -" > ${HOME}/.gitconfig - -# Install vim and configure it -RUN apt-get install -qy vim - -# Install zsh and configure zprezto -RUN echo 'N' > ./zsh_args -RUN apt-get install -qy zsh < ./zsh_args -RUN rm ./zsh_args - -RUN curl -O https://raw.githubusercontent.com/ExoKomodo/Daybreak/main/.devcontainer/tools/zsh/install_zprezto.zsh -RUN /bin/zsh ./install_zprezto.zsh - -RUN echo 'neofetch' >> ${HOME}/.zshrc - -RUN ln -s /workspaces/daybreak/bootstrap/linux/daybreak /usr/bin/daybreak diff --git a/.cicada/compose/devcontainer/Jenkinsfile b/.cicada/compose/devcontainer/Jenkinsfile deleted file mode 100644 index 10e3b0a5..00000000 --- a/.cicada/compose/devcontainer/Jenkinsfile +++ /dev/null @@ -1,54 +0,0 @@ -pipeline { - agent any - - options { - disableConcurrentBuilds() - ansiColor('xterm') - } - - environment { - DAYBREAK_BOOTSTRAP="./bootstrap/linux/daybreak" - DAYBREAK_OUT="./out" - CICADA_PRD_BRANCH="main" - CICADA_REGISTRY_PASSWORD=credentials("docker-password") - CICADA_REGISTRY_USERNAME=credentials("docker-username") - CICADA_NAME="devcontainer" - - CICADA_DOCKER_HUB_DEV_PROJECT = 'development' - CICADA_DOCKER_HUB_PRD_PROJECT = 'daybreak' - CICADA_DOCKER_HUB_USERNAME = 'exokomodo' - } - - stages { - stage ("Docker Login") { - steps { - sh "bash ${CICADA_CI_DIR}/container_login.bash" - } - } - - stage ("Build") { - environment { - CC_COMPILER = "gcc" - } - steps { - sh "bash ${CICADA_CI_DIR}/container_build.bash" - } - } - - stage ("Push") { - steps { - sh "bash ${CICADA_CI_DIR}/container_push.bash" - } - } - } - - post { - always { - sh "${CICADA_COMPOSE} fix fix_ownership" - } - - cleanup { - sh "bash ${CICADA_CI_DIR}/cleanup.bash" - } - } -} diff --git a/.cicada/compose/docker-compose.yaml b/.cicada/compose/docker-compose.yaml deleted file mode 100644 index f71904b2..00000000 --- a/.cicada/compose/docker-compose.yaml +++ /dev/null @@ -1,69 +0,0 @@ -version: '3' -services: - memory_check: - environment: - - CC_COMPILER=${CC_COMPILER} - - DAYBREAK_BOOTSTRAP=${DAYBREAK_BOOTSTRAP} - - DAYBREAK_OUT=${DAYBREAK_OUT} - build: - context: . - dockerfile: ${CICADA_COMPOSE_DIR}/daybreak/Dockerfile - command: bash /app/compose_scripts/memory_check.sh - volumes: - - .:/app:rw - test: - environment: - - CC_COMPILER=${CC_COMPILER} - - DAYBREAK_BOOTSTRAP=${DAYBREAK_BOOTSTRAP} - - DAYBREAK_OUT=${DAYBREAK_OUT} - build: - context: . - dockerfile: ${CICADA_COMPOSE_DIR}/daybreak/Dockerfile - command: bash /app/compose_scripts/test.sh - volumes: - - .:/app:rw - bootstrap: - environment: - - CC_COMPILER=${CC_COMPILER} - - DAYBREAK_BOOTSTRAP=${DAYBREAK_BOOTSTRAP} - - DAYBREAK_OUT=${DAYBREAK_OUT} - build: - context: . - dockerfile: ${CICADA_COMPOSE_DIR}/daybreak/Dockerfile - command: bash /app/compose_scripts/bootstrap.sh - volumes: - - .:/app:rw - build_daybreak: - environment: - - CC_COMPILER=${CC_COMPILER} - - DAYBREAK_BOOTSTRAP=${DAYBREAK_BOOTSTRAP} - - DAYBREAK_OUT=${DAYBREAK_OUT} - build: - context: . - dockerfile: ${CICADA_COMPOSE_DIR}/daybreak/Dockerfile - command: bash /app/compose_scripts/build.sh /app/src/main.day - volumes: - - .:/app:rw - build_daybreak_test: - environment: - - CC_COMPILER=${CC_COMPILER} - - DAYBREAK_BOOTSTRAP=${DAYBREAK_BOOTSTRAP} - - DAYBREAK_OUT=${DAYBREAK_OUT} - build: - context: . - dockerfile: ${CICADA_COMPOSE_DIR}/daybreak/Dockerfile - command: bash /app/compose_scripts/build.sh /app/tests/test_main.day - volumes: - - .:/app:rw - fix_ownership: - environment: - - CC_COMPILER=${CC_COMPILER} - - DAYBREAK_BOOTSTRAP=${DAYBREAK_BOOTSTRAP} - - DAYBREAK_OUT=${DAYBREAK_OUT} - - CICADA_CI_DIR=${CICADA_CI_DIR} - build: - context: . - dockerfile: ${CICADA_COMPOSE_DIR}/daybreak/Dockerfile - command: bash /app/${CICADA_CI_DIR}/fix_ownership.bash - volumes: - - .:/app:rw diff --git a/.cicada/head b/.cicada/head deleted file mode 160000 index 5411021a..00000000 --- a/.cicada/head +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5411021a038b4a16ed5b4eb0eb7952567ab5b326