2021-06-01 02:58:50 +02:00
|
|
|
stages:
|
|
|
|
- build
|
2021-07-19 17:18:25 +02:00
|
|
|
- build docker image
|
2021-07-19 10:23:04 +02:00
|
|
|
- test
|
2021-07-11 13:43:48 +02:00
|
|
|
- upload artifacts
|
2021-05-13 09:57:11 +02:00
|
|
|
|
2021-03-13 20:00:13 +01:00
|
|
|
variables:
|
|
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
2021-05-13 09:57:11 +02:00
|
|
|
FF_USE_FASTZIP: 1
|
2021-07-02 14:26:26 +02:00
|
|
|
CACHE_COMPRESSION_LEVEL: fastest
|
2021-03-13 20:00:13 +01:00
|
|
|
|
2021-07-02 14:26:26 +02:00
|
|
|
# --------------------------------------------------------------------- #
|
|
|
|
# Cargo: Compiling for different architectures #
|
|
|
|
# --------------------------------------------------------------------- #
|
2021-06-01 02:58:50 +02:00
|
|
|
|
2021-07-02 14:26:26 +02:00
|
|
|
.build-cargo-shared-settings:
|
2021-06-01 02:58:50 +02:00
|
|
|
stage: "build"
|
|
|
|
needs: []
|
2021-07-02 14:26:26 +02:00
|
|
|
rules:
|
2021-09-02 17:17:51 +02:00
|
|
|
- if: '$CI_COMMIT_BRANCH == "master"'
|
|
|
|
- if: '$CI_COMMIT_BRANCH == "next"'
|
2021-11-21 18:34:08 +01:00
|
|
|
- if: "$CI_COMMIT_TAG"
|
2021-06-01 02:58:50 +02:00
|
|
|
interruptible: true
|
|
|
|
image: "rust:latest"
|
2021-07-12 21:58:35 +02:00
|
|
|
tags: ["docker"]
|
2021-06-01 02:58:50 +02:00
|
|
|
cache:
|
|
|
|
paths:
|
2021-07-02 14:26:26 +02:00
|
|
|
- cargohome
|
2021-06-01 02:58:50 +02:00
|
|
|
- target/
|
2021-11-21 18:34:08 +01:00
|
|
|
key: "build_cache--$TARGET--$CI_COMMIT_BRANCH--release"
|
2021-08-22 23:05:32 +02:00
|
|
|
variables:
|
2021-11-21 18:34:08 +01:00
|
|
|
CARGO_PROFILE_RELEASE_LTO: "true"
|
|
|
|
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "1"
|
2021-07-02 14:26:26 +02:00
|
|
|
before_script:
|
|
|
|
- 'echo "Building for target $TARGET"'
|
|
|
|
- 'mkdir -p cargohome && CARGOHOME="cargohome"'
|
2021-11-21 18:34:08 +01:00
|
|
|
- "rustc --version && cargo --version && rustup show" # Print version info for debugging
|
2021-07-02 14:26:26 +02:00
|
|
|
- "rustup target add $TARGET"
|
|
|
|
script:
|
|
|
|
- time cargo build --target $TARGET --release
|
2021-11-21 18:34:08 +01:00
|
|
|
- 'cp "target/$TARGET/release/conduit" "conduit-$TARGET"'
|
2021-09-02 17:17:51 +02:00
|
|
|
artifacts:
|
|
|
|
expire_in: never
|
2021-07-02 14:26:26 +02:00
|
|
|
|
2021-11-21 18:34:08 +01:00
|
|
|
build:release:cargo:x86_64-unknown-linux-musl-with-debug:
|
2021-07-02 14:26:26 +02:00
|
|
|
extends: .build-cargo-shared-settings
|
2021-11-21 18:34:08 +01:00
|
|
|
image: messense/rust-musl-cross:x86_64-musl
|
2021-06-01 02:58:50 +02:00
|
|
|
variables:
|
2021-11-21 18:34:08 +01:00
|
|
|
CARGO_PROFILE_RELEASE_DEBUG: 2 # Enable debug info for flamegraph profiling
|
|
|
|
TARGET: "x86_64-unknown-linux-musl"
|
|
|
|
after_script:
|
|
|
|
- "mv ./conduit-x86_64-unknown-linux-musl ./conduit-x86_64-unknown-linux-musl-with-debug"
|
2021-07-19 19:42:25 +02:00
|
|
|
artifacts:
|
2021-11-21 18:34:08 +01:00
|
|
|
name: "conduit-x86_64-unknown-linux-musl-with-debug"
|
2021-07-19 19:42:25 +02:00
|
|
|
paths:
|
2021-11-21 18:34:08 +01:00
|
|
|
- "conduit-x86_64-unknown-linux-musl-with-debug"
|
|
|
|
expose_as: "Conduit for x86_64-unknown-linux-musl-with-debug"
|
2021-07-02 14:26:26 +02:00
|
|
|
|
2021-11-21 18:34:08 +01:00
|
|
|
build:release:cargo:x86_64-unknown-linux-musl:
|
2021-07-02 14:26:26 +02:00
|
|
|
extends: .build-cargo-shared-settings
|
2021-11-21 18:34:08 +01:00
|
|
|
image: messense/rust-musl-cross:x86_64-musl
|
2021-07-02 14:26:26 +02:00
|
|
|
variables:
|
2021-11-21 18:34:08 +01:00
|
|
|
TARGET: "x86_64-unknown-linux-musl"
|
2021-07-19 19:42:25 +02:00
|
|
|
artifacts:
|
2021-11-21 18:34:08 +01:00
|
|
|
name: "conduit-x86_64-unknown-linux-musl"
|
2021-07-19 19:42:25 +02:00
|
|
|
paths:
|
2021-11-21 18:34:08 +01:00
|
|
|
- "conduit-x86_64-unknown-linux-musl"
|
|
|
|
expose_as: "Conduit for x86_64-unknown-linux-musl"
|
2021-07-02 14:26:26 +02:00
|
|
|
|
2021-11-21 18:34:08 +01:00
|
|
|
build:release:cargo:arm-unknown-linux-musleabihf:
|
2021-07-02 14:26:26 +02:00
|
|
|
extends: .build-cargo-shared-settings
|
2021-11-21 18:34:08 +01:00
|
|
|
image: messense/rust-musl-cross:arm-musleabihf
|
2021-07-02 14:26:26 +02:00
|
|
|
variables:
|
2021-11-21 18:34:08 +01:00
|
|
|
TARGET: "arm-unknown-linux-musleabihf"
|
2021-07-19 19:42:25 +02:00
|
|
|
artifacts:
|
2021-11-21 18:34:08 +01:00
|
|
|
name: "conduit-arm-unknown-linux-musleabihf"
|
2021-07-19 19:42:25 +02:00
|
|
|
paths:
|
2021-11-21 18:34:08 +01:00
|
|
|
- "conduit-arm-unknown-linux-musleabihf"
|
|
|
|
expose_as: "Conduit for arm-unknown-linux-musleabihf"
|
2021-07-02 14:26:26 +02:00
|
|
|
|
2021-11-21 18:34:08 +01:00
|
|
|
build:release:cargo:armv7-unknown-linux-musleabihf:
|
2021-07-19 10:47:31 +02:00
|
|
|
extends: .build-cargo-shared-settings
|
2021-11-21 18:34:08 +01:00
|
|
|
image: messense/rust-musl-cross:armv7-musleabihf
|
2021-07-19 10:47:31 +02:00
|
|
|
variables:
|
2021-11-21 18:34:08 +01:00
|
|
|
TARGET: "armv7-unknown-linux-musleabihf"
|
2021-07-19 19:42:25 +02:00
|
|
|
artifacts:
|
2021-11-21 18:34:08 +01:00
|
|
|
name: "conduit-armv7-unknown-linux-musleabihf"
|
2021-07-19 19:42:25 +02:00
|
|
|
paths:
|
2021-11-21 18:34:08 +01:00
|
|
|
- "conduit-armv7-unknown-linux-musleabihf"
|
|
|
|
expose_as: "Conduit for armv7-unknown-linux-musleabihf"
|
2021-08-13 17:20:40 +02:00
|
|
|
|
2021-11-21 18:34:08 +01:00
|
|
|
build:release:cargo:aarch64-unknown-linux-musl:
|
|
|
|
extends: .build-cargo-shared-settings
|
|
|
|
image: messense/rust-musl-cross:aarch64-musl
|
|
|
|
variables:
|
|
|
|
TARGET: "aarch64-unknown-linux-musl"
|
|
|
|
artifacts:
|
|
|
|
name: "conduit-aarch64-unknown-linux-musl"
|
|
|
|
paths:
|
|
|
|
- "conduit-aarch64-unknown-linux-musl"
|
|
|
|
expose_as: "Conduit for aarch64-unknown-linux-musl"
|
2021-08-13 17:20:40 +02:00
|
|
|
|
|
|
|
.cargo-debug-shared-settings:
|
|
|
|
extends: ".build-cargo-shared-settings"
|
|
|
|
rules:
|
2021-11-21 18:34:08 +01:00
|
|
|
- if: '$CI_COMMIT_BRANCH != "master"'
|
2021-08-13 17:20:40 +02:00
|
|
|
cache:
|
2021-11-21 18:34:08 +01:00
|
|
|
key: "build_cache--$TARGET--$CI_COMMIT_BRANCH--debug"
|
2021-08-13 17:20:40 +02:00
|
|
|
script:
|
|
|
|
- "time cargo build --target $TARGET"
|
|
|
|
- 'mv "target/$TARGET/debug/conduit" "conduit-debug-$TARGET"'
|
2021-09-02 17:17:51 +02:00
|
|
|
artifacts:
|
|
|
|
expire_in: 4 weeks
|
2021-08-13 17:20:40 +02:00
|
|
|
|
|
|
|
build:debug:cargo:x86_64-unknown-linux-musl:
|
|
|
|
extends: ".cargo-debug-shared-settings"
|
2021-11-21 18:34:08 +01:00
|
|
|
image: messense/rust-musl-cross:x86_64-musl
|
2021-08-13 17:20:40 +02:00
|
|
|
variables:
|
|
|
|
TARGET: "x86_64-unknown-linux-musl"
|
|
|
|
artifacts:
|
|
|
|
name: "conduit-debug-x86_64-unknown-linux-musl"
|
|
|
|
paths:
|
|
|
|
- "conduit-debug-x86_64-unknown-linux-musl"
|
|
|
|
expose_as: "Conduit DEBUG for x86_64-unknown-linux-musl"
|
|
|
|
|
2021-07-19 17:18:25 +02:00
|
|
|
# --------------------------------------------------------------------- #
|
|
|
|
# Create and publish docker image #
|
|
|
|
# --------------------------------------------------------------------- #
|
|
|
|
|
|
|
|
.docker-shared-settings:
|
|
|
|
stage: "build docker image"
|
2021-11-21 18:34:08 +01:00
|
|
|
image: jdrouet/docker-with-buildx:stable
|
2021-07-19 17:18:25 +02:00
|
|
|
tags: ["docker"]
|
2021-11-21 18:34:08 +01:00
|
|
|
services:
|
|
|
|
- docker:dind
|
2021-07-19 17:18:25 +02:00
|
|
|
needs:
|
2021-08-13 17:20:40 +02:00
|
|
|
- "build:release:cargo:x86_64-unknown-linux-musl"
|
2021-11-21 18:34:08 +01:00
|
|
|
- "build:release:cargo:arm-unknown-linux-musleabihf"
|
|
|
|
- "build:release:cargo:armv7-unknown-linux-musleabihf"
|
|
|
|
- "build:release:cargo:aarch64-unknown-linux-musl"
|
|
|
|
variables:
|
|
|
|
DOCKER_HOST: tcp://docker:2375/
|
|
|
|
DOCKER_TLS_CERTDIR: ""
|
|
|
|
DOCKER_DRIVER: overlay2
|
|
|
|
PLATFORMS: "linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64"
|
|
|
|
DOCKER_FILE: "docker/ci-binaries-packaging.Dockerfile"
|
|
|
|
before_script:
|
|
|
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
|
|
|
# Only log in to Dockerhub if the credentials are given:
|
|
|
|
- if [ -n "${DOCKER_HUB}" ]; then docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_PASSWORD" "$DOCKER_HUB"; fi
|
2021-07-19 17:18:25 +02:00
|
|
|
script:
|
2021-11-21 18:34:08 +01:00
|
|
|
# Prepare buildx to build multiarch stuff:
|
|
|
|
- docker context create 'ci-context'
|
|
|
|
- docker buildx create --name 'multiarch-builder' --use 'ci-context'
|
|
|
|
# Copy binaries to their docker arch path
|
|
|
|
- mkdir -p linux/ && mv ./conduit-x86_64-unknown-linux-musl linux/amd64
|
|
|
|
- mkdir -p linux/arm/ && mv ./conduit-arm-unknown-linux-musleabihf linux/arm/v6
|
|
|
|
- mkdir -p linux/arm/ && mv ./conduit-armv7-unknown-linux-musleabihf linux/arm/v7
|
|
|
|
- mkdir -p linux/arm64/ && mv ./conduit-aarch64-unknown-linux-musl linux/arm64/v8
|
|
|
|
# Actually create multiarch image:
|
2021-07-19 17:18:25 +02:00
|
|
|
- >
|
2021-11-21 18:34:08 +01:00
|
|
|
docker buildx build
|
|
|
|
--pull
|
|
|
|
--push
|
2021-07-19 17:18:25 +02:00
|
|
|
--build-arg CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
|
|
|
--build-arg VERSION=$(grep -m1 -o '[0-9].[0-9].[0-9]' Cargo.toml)
|
2021-08-31 18:03:44 +02:00
|
|
|
--build-arg "GIT_REF=$CI_COMMIT_SHORT_SHA"
|
2021-11-21 18:34:08 +01:00
|
|
|
--platform "$PLATFORMS"
|
|
|
|
--tag "$GL_IMAGE_TAG"
|
|
|
|
--tag "$GL_IMAGE_TAG-commit-$CI_COMMIT_SHORT_SHA"
|
|
|
|
--file "$DOCKER_FILE" .
|
|
|
|
# Only try to push to docker hub, if auth data for dockerhub exists:
|
|
|
|
- if [ -n "${DOCKER_HUB}" ]; then docker push "$DH_IMAGE_TAG"; fi
|
|
|
|
- if [ -n "${DOCKER_HUB}" ]; then docker push "$DH_IMAGE_TAG-commit-$CI_COMMIT_SHORT_SHA"; fi
|
|
|
|
|
|
|
|
build:docker:next:
|
|
|
|
extends: .docker-shared-settings
|
2021-07-19 17:18:25 +02:00
|
|
|
rules:
|
2021-09-02 17:17:51 +02:00
|
|
|
- if: '$CI_COMMIT_BRANCH == "next"'
|
2021-11-21 18:34:08 +01:00
|
|
|
variables:
|
|
|
|
GL_IMAGE_TAG: "$CI_REGISTRY_IMAGE/matrix-conduit:next"
|
|
|
|
DH_IMAGE_TAG: "$DOCKER_HUB_IMAGE/matrixconduit/matrix-conduit:next"
|
2021-09-02 17:17:51 +02:00
|
|
|
|
|
|
|
build:docker:master:
|
|
|
|
extends: .docker-shared-settings
|
|
|
|
rules:
|
|
|
|
- if: '$CI_COMMIT_BRANCH == "master"'
|
2021-11-21 18:34:08 +01:00
|
|
|
variables:
|
|
|
|
GL_IMAGE_TAG: "$CI_REGISTRY_IMAGE/matrix-conduit:latest"
|
|
|
|
DH_IMAGE_TAG: "$DOCKER_HUB_IMAGE/matrixconduit/matrix-conduit:latest"
|
|
|
|
|
|
|
|
## Build a docker image by packaging up the x86_64-unknown-linux-musl binary into an alpine image
|
|
|
|
#.docker-shared-settings:
|
|
|
|
# stage: "build docker image"
|
|
|
|
# needs: []
|
|
|
|
# interruptible: true
|
|
|
|
# image:
|
|
|
|
# name: "gcr.io/kaniko-project/executor:debug"
|
|
|
|
# entrypoint: [""]
|
|
|
|
# tags: ["docker"]
|
|
|
|
# variables:
|
|
|
|
# # Configure Kaniko Caching: https://cloud.google.com/build/docs/kaniko-cache
|
|
|
|
# KANIKO_CACHE_ARGS: "--cache=true --cache-copy-layers=true --cache-ttl=120h --cache-repo $CI_REGISTRY_IMAGE/kaniko-ci-cache"
|
|
|
|
# before_script:
|
|
|
|
# - "mkdir -p /kaniko/.docker"
|
|
|
|
# - 'echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"},\"$DOCKER_HUB\":{\"username\":\"$DOCKER_HUB_USER\",\"password\":\"$DOCKER_HUB_PASSWORD\"}}}" > /kaniko/.docker/config.json'
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#build:docker:next:
|
|
|
|
# extends: .docker-shared-settings
|
|
|
|
# needs:
|
|
|
|
# - "build:release:cargo:x86_64-unknown-linux-musl"
|
|
|
|
# script:
|
|
|
|
# - >
|
|
|
|
# /kaniko/executor
|
|
|
|
# $KANIKO_CACHE_ARGS
|
|
|
|
# --force
|
|
|
|
# --context $CI_PROJECT_DIR
|
|
|
|
# --build-arg CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
|
|
|
# --build-arg VERSION=$(grep -m1 -o '[0-9].[0-9].[0-9]' Cargo.toml)
|
|
|
|
# --build-arg "GIT_REF=$CI_COMMIT_SHORT_SHA"
|
|
|
|
# --dockerfile "$CI_PROJECT_DIR/docker/ci-binaries-packaging.Dockerfile"
|
|
|
|
# --destination "$CI_REGISTRY_IMAGE/conduit:next"
|
|
|
|
# --destination "$CI_REGISTRY_IMAGE/conduit:next-alpine"
|
|
|
|
# --destination "$CI_REGISTRY_IMAGE/conduit:commit-$CI_COMMIT_SHORT_SHA"
|
|
|
|
# --destination "$DOCKER_HUB_IMAGE/matrixconduit/matrix-conduit:next"
|
|
|
|
# --destination "$DOCKER_HUB_IMAGE/matrixconduit/matrix-conduit:next-alpine"
|
|
|
|
# --destination "$DOCKER_HUB_IMAGE/matrixconduit/matrix-conduit:commit-$CI_COMMIT_SHORT_SHA"
|
|
|
|
# rules:
|
|
|
|
# - if: '$CI_COMMIT_BRANCH == "next"'
|
|
|
|
#
|
|
|
|
#
|
2021-08-13 17:20:40 +02:00
|
|
|
|
|
|
|
# --------------------------------------------------------------------- #
|
|
|
|
# Run tests #
|
|
|
|
# --------------------------------------------------------------------- #
|
|
|
|
|
|
|
|
test:cargo:
|
|
|
|
stage: "test"
|
2021-11-21 18:34:08 +01:00
|
|
|
needs: []
|
2021-08-13 17:20:40 +02:00
|
|
|
image: "rust:latest"
|
2021-11-21 18:34:08 +01:00
|
|
|
tags: ["docker"]
|
2021-08-13 17:20:40 +02:00
|
|
|
variables:
|
|
|
|
CARGO_HOME: "cargohome"
|
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- target
|
|
|
|
- cargohome
|
|
|
|
key: test_cache
|
|
|
|
interruptible: true
|
|
|
|
before_script:
|
|
|
|
- mkdir -p $CARGO_HOME && echo "using $CARGO_HOME to cache cargo deps"
|
|
|
|
- apt-get update -yqq
|
2021-11-21 18:34:08 +01:00
|
|
|
- apt-get install -yqq --no-install-recommends build-essential libssl-dev pkg-config wget
|
2021-08-13 17:20:40 +02:00
|
|
|
- rustup component add clippy rustfmt
|
2021-11-21 18:34:08 +01:00
|
|
|
- wget "https://faulty-storage.de/gitlab-report"
|
|
|
|
- chmod +x ./gitlab-report
|
2021-08-13 17:20:40 +02:00
|
|
|
script:
|
2021-11-21 18:34:08 +01:00
|
|
|
- rustc --version && cargo --version # Print version info for debugging
|
2021-08-13 17:20:40 +02:00
|
|
|
- cargo fmt --all -- --check
|
2021-11-21 18:34:08 +01:00
|
|
|
- "cargo test --color always --workspace --verbose --locked --no-fail-fast -- -Z unstable-options --format json | ./gitlab-report -p test > $CI_PROJECT_DIR/report.xml"
|
|
|
|
- "cargo clippy --color always --verbose --message-format=json | ./gitlab-report -p clippy > $CI_PROJECT_DIR/gl-code-quality-report.json"
|
|
|
|
artifacts:
|
|
|
|
when: always
|
|
|
|
reports:
|
|
|
|
junit: report.xml
|
|
|
|
codequality: gl-code-quality-report.json
|
2021-08-13 17:20:40 +02:00
|
|
|
|
|
|
|
test:sytest:
|
|
|
|
stage: "test"
|
|
|
|
allow_failure: true
|
|
|
|
needs:
|
|
|
|
- "build:debug:cargo:x86_64-unknown-linux-musl"
|
|
|
|
image:
|
|
|
|
name: "valkum/sytest-conduit:latest"
|
2021-11-21 18:34:08 +01:00
|
|
|
entrypoint: [""]
|
|
|
|
tags: ["docker"]
|
2021-08-13 17:20:40 +02:00
|
|
|
variables:
|
|
|
|
PLUGINS: "https://github.com/valkum/sytest_conduit/archive/master.tar.gz"
|
|
|
|
before_script:
|
|
|
|
- "mkdir -p /app"
|
|
|
|
- "cp ./conduit-debug-x86_64-unknown-linux-musl /app/conduit"
|
|
|
|
- "chmod +x /app/conduit"
|
|
|
|
- "rm -rf /src && ln -s $CI_PROJECT_DIR/ /src"
|
|
|
|
- "mkdir -p /work/server-0/database/ && mkdir -p /work/server-1/database/ && mkdir -p /work/server-2/database/"
|
|
|
|
- "cd /"
|
|
|
|
script:
|
|
|
|
- "SYTEST_EXIT_CODE=0"
|
|
|
|
- "/bootstrap.sh conduit || SYTEST_EXIT_CODE=1"
|
2021-11-21 18:34:08 +01:00
|
|
|
- 'perl /sytest/tap-to-junit-xml.pl --puretap --input /logs/results.tap --output $CI_PROJECT_DIR/sytest.xml "Sytest" && cp /logs/results.tap $CI_PROJECT_DIR/results.tap'
|
2021-08-13 17:20:40 +02:00
|
|
|
- "exit $SYTEST_EXIT_CODE"
|
|
|
|
artifacts:
|
|
|
|
when: always
|
|
|
|
paths:
|
|
|
|
- "$CI_PROJECT_DIR/sytest.xml"
|
|
|
|
- "$CI_PROJECT_DIR/results.tap"
|
|
|
|
reports:
|
|
|
|
junit: "$CI_PROJECT_DIR/sytest.xml"
|
|
|
|
|
2021-07-02 14:26:26 +02:00
|
|
|
# --------------------------------------------------------------------- #
|
2021-07-11 13:43:48 +02:00
|
|
|
# Store binaries as package so they have download urls #
|
2021-07-02 14:26:26 +02:00
|
|
|
# --------------------------------------------------------------------- #
|
2021-06-01 02:58:50 +02:00
|
|
|
|
|
|
|
publish:package:
|
2021-07-11 13:43:48 +02:00
|
|
|
stage: "upload artifacts"
|
2021-07-02 14:26:26 +02:00
|
|
|
needs:
|
2021-08-13 17:20:40 +02:00
|
|
|
- "build:release:cargo:x86_64-unknown-linux-musl"
|
2021-11-21 18:34:08 +01:00
|
|
|
- "build:release:cargo:arm-unknown-linux-musleabihf"
|
|
|
|
- "build:release:cargo:armv7-unknown-linux-musleabihf"
|
|
|
|
- "build:release:cargo:aarch64-unknown-linux-musl"
|
|
|
|
# - "build:cargo-deb:x86_64-unknown-linux-gnu"
|
2021-07-02 14:26:26 +02:00
|
|
|
rules:
|
2021-09-02 17:17:51 +02:00
|
|
|
- if: '$CI_COMMIT_BRANCH == "master"'
|
|
|
|
- if: '$CI_COMMIT_BRANCH == "next"'
|
2021-11-21 18:34:08 +01:00
|
|
|
- if: "$CI_COMMIT_TAG"
|
2021-06-01 02:58:50 +02:00
|
|
|
image: curlimages/curl:latest
|
2021-07-12 21:58:35 +02:00
|
|
|
tags: ["docker"]
|
2021-07-02 14:26:26 +02:00
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: "none" # Don't need a clean copy of the code, we just operate on artifacts
|
2021-06-01 02:58:50 +02:00
|
|
|
script:
|
2021-07-02 14:26:26 +02:00
|
|
|
- 'BASE_URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/conduit-${CI_COMMIT_REF_SLUG}/build-${CI_PIPELINE_ID}"'
|
2021-07-19 12:00:44 +02:00
|
|
|
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file conduit-x86_64-unknown-linux-musl "${BASE_URL}/conduit-x86_64-unknown-linux-musl"'
|
2021-11-21 18:34:08 +01:00
|
|
|
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file conduit-arm-unknown-linux-musleabihf "${BASE_URL}/conduit-arm-unknown-linux-musleabihf"'
|
|
|
|
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file conduit-armv7-unknown-linux-musleabihf "${BASE_URL}/conduit-armv7-unknown-linux-musleabihf"'
|
|
|
|
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file conduit-aarch64-unknown-linux-musl "${BASE_URL}/conduit-aarch64-unknown-linux-musl"'
|
2021-07-30 15:29:45 +02:00
|
|
|
|
2021-11-21 18:34:08 +01:00
|
|
|
# Avoid duplicate pipelines
|
|
|
|
# See: https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines
|
|
|
|
workflow:
|
|
|
|
rules:
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
|
|
- if: "$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS"
|
|
|
|
when: never
|
|
|
|
- if: "$CI_COMMIT_BRANCH"
|