Commit ceeaf488 authored by Ben Gamari's avatar Ben Gamari 🐢

gitlab-ci: Add support for builds against stable branch

parent f82bb0bc
Pipeline #11559 canceled with stage
...@@ -34,7 +34,43 @@ variables: ...@@ -34,7 +34,43 @@ variables:
# GHC during the package builds. This is instantiated with, e.g., -dcore-lint # GHC during the package builds. This is instantiated with, e.g., -dcore-lint
# during GHC validation builds. # during GHC validation builds.
build: # A build triggered from a ghc/ghc> pipeline.
build-pipeline:
extends: .build
before_script:
- |
if [ -n "$GHC_PIPELINE_ID" ]; then
job_name="validate-x86_64-linux-fedora27"
job_id=$(nix run -f scripts/build-all.nix find-job \
--arg bindistTarball $GHC_TARBALL \
-c find-job.sh $GHC_PROJECT_ID $GHC_PIPELINE_ID $job_name)
echo "Pulling ${job_name} binary distribution from Pipeline $GHC_PIPELINE_ID (job $job_id)..."
fi
only:
- api
- pipelines
- triggers
- web
# Build against the master branch
build-master:
extends: .build
variables:
GHC_TARBALL: "https://gitlab.haskell.org/api/v4/projects/1/jobs/artifacts/master/raw/ghc-x86_64-fedora27-linux.tar.xz?job=validate-x86_64-linux-fedora27"
only:
- branches
- merge_requests
# Build against the 8.8 branch
build-8.8:
extends: .build
variables:
GHC_TARBALL: "https://gitlab.haskell.org/api/v4/projects/1/jobs/artifacts/ghc-8.8/raw/ghc-8.8.1-x86_64-unknown-linux.tar.xz?job=validate-x86_64-linux-fedora27"
only:
- branches
- merge_requests
.build:
stage: test stage: test
tags: tags:
...@@ -44,20 +80,11 @@ build: ...@@ -44,20 +80,11 @@ build:
image: nixos/nix image: nixos/nix
cache: cache:
key: build-all key: build-HEAD
paths: paths:
- store.nar - store.nar
script: script:
- |
if [ -n "$GHC_PIPELINE_ID" ]; then
job_name="validate-x86_64-linux-fedora27"
job_id=$(nix run -f scripts/build-all.nix find-job \
--arg bindistTarball $GHC_TARBALL \
-c find-job.sh $GHC_PROJECT_ID $GHC_PIPELINE_ID $job_name)
echo "Pulling ${job_name} binary distribution from Pipeline $GHC_PIPELINE_ID (job $job_id)..."
fi
- echo "Bindist tarball is $GHC_TARBALL" - echo "Bindist tarball is $GHC_TARBALL"
- | - |
nix build \ nix build \
...@@ -115,7 +142,7 @@ update-repo: ...@@ -115,7 +142,7 @@ update-repo:
- cp summary.dot.svg repo - cp summary.dot.svg repo
dependencies: dependencies:
- build - build-master
after_script: after_script:
- rm -Rf keys - rm -Rf keys
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment