srfghsfnn
This commit is contained in:
@@ -5,11 +5,6 @@ workflow:
|
|||||||
- if: $CI_COMMIT_TAG # ... on tags
|
- if: $CI_COMMIT_TAG # ... on tags
|
||||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # ... on default (master/main) branch
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # ... on default (master/main) branch
|
||||||
|
|
||||||
stages:
|
|
||||||
- build-image
|
|
||||||
- test
|
|
||||||
|
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
# Fetch submodules
|
# Fetch submodules
|
||||||
GIT_SUBMODULE_STRATEGY: recursive
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
@@ -17,6 +12,13 @@ variables:
|
|||||||
GIT_SUBMODULE_DEPTH: 1
|
GIT_SUBMODULE_DEPTH: 1
|
||||||
GIT_DEPTH: 1
|
GIT_DEPTH: 1
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- build-image
|
||||||
|
- test
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Builds the image and pushes it to the registry
|
# Builds the image and pushes it to the registry
|
||||||
# This image contains all the tooling necessary to run the compilation tools
|
# This image contains all the tooling necessary to run the compilation tools
|
||||||
build-image:
|
build-image:
|
||||||
|
@@ -1,23 +1,27 @@
|
|||||||
# name: default pipe
|
# This CI will run:
|
||||||
|
workflow:
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' # ... on merge requests
|
||||||
|
- if: $CI_COMMIT_TAG # ... on tags
|
||||||
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # ... on default (master/main) branch
|
||||||
|
|
||||||
# on:
|
variables:
|
||||||
# push:
|
# Fetch submodules
|
||||||
# branches:
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
# - master
|
# Only fetch the latest commit (shallow clone, faster)
|
||||||
|
GIT_SUBMODULE_DEPTH: 1
|
||||||
# # This CI will run:
|
GIT_DEPTH: 1
|
||||||
# workflow:
|
|
||||||
# rules:
|
|
||||||
# - if: $CI_PIPELINE_SOURCE == 'merge_request_event' # ... on merge requests
|
|
||||||
# - if: $CI_COMMIT_TAG # ... on tags
|
|
||||||
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # ... on default (master/main) branch
|
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build-image
|
- build-image
|
||||||
- test
|
- test
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Builds the image and pushes it to the registry
|
# Builds the image and pushes it to the registry
|
||||||
# This image contains all the tooling necessary to run the compilation tools
|
# This image contains all the tooling necessary to run the compilation tools
|
||||||
build-image:
|
build-image:
|
||||||
stage: build-image
|
stage: build-image
|
||||||
# Run image build only if packages changed
|
# Run image build only if packages changed
|
||||||
only:
|
only:
|
||||||
@@ -33,11 +37,6 @@ stages:
|
|||||||
- docker:dind
|
- docker:dind
|
||||||
variables:
|
variables:
|
||||||
DOCKER_DRIVER: overlay2
|
DOCKER_DRIVER: overlay2
|
||||||
# Fetch submodules
|
|
||||||
GIT_SUBMODULE_STRATEGY: recursive
|
|
||||||
# Only fetch the latest commit (shallow clone, faster)
|
|
||||||
GIT_SUBMODULE_DEPTH: 1
|
|
||||||
GIT_DEPTH: 1
|
|
||||||
script:
|
script:
|
||||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY # Login to the registry
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY # Login to the registry
|
||||||
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME || true # Pull the image if it exists
|
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME || true # Pull the image if it exists
|
||||||
@@ -51,18 +50,12 @@ stages:
|
|||||||
.
|
.
|
||||||
- docker push --all-tags $CI_REGISTRY_IMAGE # Push the image to the registry
|
- docker push --all-tags $CI_REGISTRY_IMAGE # Push the image to the registry
|
||||||
|
|
||||||
# Try to compile the code inside the image to make sure it works (run docker container)
|
# Try to compile the code inside the image to make sure it works (run docker container)
|
||||||
build-test-us10:
|
build-test-us10:
|
||||||
stage: test
|
stage: test
|
||||||
image:
|
image:
|
||||||
name: $CI_REGISTRY_IMAGE:latest
|
name: $CI_REGISTRY_IMAGE:latest
|
||||||
entrypoint: [""]
|
entrypoint: [""]
|
||||||
variables:
|
|
||||||
# Fetch submodules
|
|
||||||
GIT_SUBMODULE_STRATEGY: recursive
|
|
||||||
# Only fetch the latest commit (shallow clone, faster)
|
|
||||||
GIT_SUBMODULE_DEPTH: 1
|
|
||||||
GIT_DEPTH: 1
|
|
||||||
before_script:
|
before_script:
|
||||||
# Download the baserom from $BASEROM_<VER>_URL, decrypt with $BASEROM_<VER>_KEY and save as baserom.us.v10.z64, and check the sha1sum against $BASEROM_<VER>_SHA1
|
# Download the baserom from $BASEROM_<VER>_URL, decrypt with $BASEROM_<VER>_KEY and save as baserom.us.v10.z64, and check the sha1sum against $BASEROM_<VER>_SHA1
|
||||||
- curl -L "$BASEROM_US10_URL" -o baserom.us.v10.enc.z64
|
- curl -L "$BASEROM_US10_URL" -o baserom.us.v10.enc.z64
|
||||||
@@ -79,3 +72,27 @@ stages:
|
|||||||
- echo "Calculated SHA1 - $FILE_SHA1"
|
- echo "Calculated SHA1 - $FILE_SHA1"
|
||||||
- echo "Expected SHA1 - $BASEROM_US10_SHA1"
|
- echo "Expected SHA1 - $BASEROM_US10_SHA1"
|
||||||
- if [ "${FILE_SHA1}" != "${BASEROM_US10_SHA1}" ]; then echo "Checksum verification failed"; exit 1; else echo "Checksum verification passed"; fi
|
- if [ "${FILE_SHA1}" != "${BASEROM_US10_SHA1}" ]; then echo "Checksum verification failed"; exit 1; else echo "Checksum verification passed"; fi
|
||||||
|
|
||||||
|
# Try to compile the code inside the image to make sure it works (run docker container)
|
||||||
|
build-test-pal:
|
||||||
|
stage: test
|
||||||
|
image:
|
||||||
|
name: $CI_REGISTRY_IMAGE:latest
|
||||||
|
entrypoint: [""]
|
||||||
|
before_script:
|
||||||
|
- curl -L "$BASEROM_PAL_URL" -o baserom.pal.enc.z64
|
||||||
|
- openssl enc -d -aes-256-cbc -in baserom.pal.enc.z64 -out baserom.pal.z64 -k "$BASEROM_PAL_KEY"
|
||||||
|
- FILE_SHA1=$(sha1sum baserom.pal.z64 | awk '{ print $1 }')
|
||||||
|
- echo "Calculated SHA1 - $FILE_SHA1"
|
||||||
|
- echo "Expected SHA1 - $BASEROM_PAL_SHA1"
|
||||||
|
- if [ "${FILE_SHA1}" != "${BASEROM_PAL_SHA1}" ]; then echo "Checksum verification failed"; exit 1; else echo "Checksum verification passed"; fi
|
||||||
|
script:
|
||||||
|
# Compile the code
|
||||||
|
- make VERSION=pal
|
||||||
|
# Check if the resulting decompressed ROM is the same as the expected one
|
||||||
|
# ToDo: compare compressed ROMs once tooling is in place
|
||||||
|
- DECOMP_SHA1=$(sha1sum decompressed.pal.z64 | awk '{ print $1 }')
|
||||||
|
- FILE_SHA1=$(sha1sum build/pal/banjo.pal.prelim.z64 | awk '{ print $1 }')
|
||||||
|
- echo "Calculated SHA1 - $FILE_SHA1"
|
||||||
|
- echo "Expected SHA1 - $DECOMP_SHA1"
|
||||||
|
- if [ "${FILE_SHA1}" != "${DECOMP_SHA1}" ]; then echo "Checksum verification failed"; exit 1; else echo "Checksum verification passed"; fi
|
||||||
|
Reference in New Issue
Block a user