Run many jobs on master branch only

This commit is contained in:
timvisee 2023-01-25 20:45:55 +01:00
parent f4870c66fa
commit 226215479c
No known key found for this signature in database
GPG Key ID: B8DB720BC383E172

View File

@ -56,6 +56,8 @@ check-msrv:
<<: *check-base <<: *check-base
variables: variables:
RUST_VERSION: 1.60.0 RUST_VERSION: 1.60.0
only:
- master
# Build using Rust stable on Linux # Build using Rust stable on Linux
build-x86_64-linux-gnu: build-x86_64-linux-gnu:
@ -74,6 +76,8 @@ build-x86_64-linux-gnu:
# Build a static version # Build a static version
build-x86_64-linux-musl: build-x86_64-linux-musl:
stage: build stage: build
only:
- master
needs: [] needs: []
variables: variables:
TARGET: x86_64-unknown-linux-musl TARGET: x86_64-unknown-linux-musl
@ -95,6 +99,8 @@ build-x86_64-linux-musl:
build-armv7-linux-gnu: build-armv7-linux-gnu:
stage: build stage: build
image: ubuntu image: ubuntu
only:
- master
needs: [] needs: []
variables: variables:
TARGET: armv7-unknown-linux-gnueabihf TARGET: armv7-unknown-linux-gnueabihf
@ -128,6 +134,8 @@ build-armv7-linux-gnu:
build-aarch64-linux-gnu: build-aarch64-linux-gnu:
stage: build stage: build
image: ubuntu image: ubuntu
only:
- master
needs: [] needs: []
variables: variables:
TARGET: aarch64-unknown-linux-gnu TARGET: aarch64-unknown-linux-gnu
@ -162,6 +170,8 @@ build-x86_64-windows:
stage: build stage: build
tags: tags:
- windows - windows
only:
- master
allow_failure: true allow_failure: true
needs: [] needs: []
variables: variables:
@ -179,6 +189,8 @@ build-x86_64-windows:
# Run the unit tests through Cargo on Linux # Run the unit tests through Cargo on Linux
test-cargo-x86_64-linux-gnu: test-cargo-x86_64-linux-gnu:
stage: test stage: test
only:
- master
needs: [] needs: []
dependencies: [] dependencies: []
script: script:
@ -212,7 +224,8 @@ release-gitlab-generic-package:
- build-aarch64-linux-gnu - build-aarch64-linux-gnu
- build-x86_64-windows - build-x86_64-windows
only: only:
- /^v(\d+\.)*\d+$/ - master
- /^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
variables: variables:
LINUX_GNU_BIN: "lazymc-x86_64-unknown-linux-gnu" LINUX_GNU_BIN: "lazymc-x86_64-unknown-linux-gnu"
LINUX_MUSL_BIN: "lazymc-x86_64-unknown-linux-musl" LINUX_MUSL_BIN: "lazymc-x86_64-unknown-linux-musl"
@ -242,7 +255,8 @@ release-gitlab-release:
image: registry.gitlab.com/gitlab-org/release-cli image: registry.gitlab.com/gitlab-org/release-cli
stage: release stage: release
only: only:
- /^v(\d+\.)*\d+$/ - master
- /^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
variables: variables:
LINUX_GNU_BIN: "lazymc-x86_64-unknown-linux-gnu" LINUX_GNU_BIN: "lazymc-x86_64-unknown-linux-gnu"
LINUX_MUSL_BIN: "lazymc-x86_64-unknown-linux-musl" LINUX_MUSL_BIN: "lazymc-x86_64-unknown-linux-musl"
@ -268,7 +282,8 @@ release-gitlab-release:
release-github: release-github:
stage: release stage: release
only: only:
- /^v(\d+\.)*\d+$/ - master
- /^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
dependencies: dependencies:
- build-x86_64-linux-gnu - build-x86_64-linux-gnu
- build-x86_64-linux-musl - build-x86_64-linux-musl