Changeset View
Changeset View
Standalone View
Standalone View
.gitlab-ci.yml
| workflow: | workflow: | ||||
| rules: | rules: | ||||
| - if: '$CI_PIPELINE_SOURCE == "trigger"' | - if: '$CI_PIPELINE_SOURCE == "trigger"' | ||||
| - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' | - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' | ||||
| when: never | when: never | ||||
| - if: $CI_COMMIT_BRANCH | - if: $CI_COMMIT_BRANCH | ||||
| - if: '$CI_COMMIT_TAG !~ /^phabricator\//' | - if: '$CI_COMMIT_TAG !~ /^phabricator\//' | ||||
| stages: | stages: | ||||
| - prepare | |||||
| - build | - build | ||||
| - report | |||||
| .report: | |||||
| image: | |||||
| name: 'reg.lily.kazv.moe/infra/phorge-ci-tools:servant' | |||||
| rules: | |||||
| - if: $TARGET_PHID | |||||
| when: always | |||||
| - when: never | |||||
| before_script: | |||||
| - pipelineUrl="$CI_PROJECT_URL"/-/pipelines/"$CI_PIPELINE_ID" | |||||
| report-start: | |||||
| extends: .report | |||||
| stage: prepare | |||||
| script: | |||||
| - 'echo "{\"receiver\": \"$TARGET_PHID\", \"type\": \"work\", \"unit\": [{\"name\": \"GitLab CI (information only)\", \"result\": \"skip\", \"details\": \"$pipelineUrl\", \"format\": \"remarkup\"}]}" | /tools/arcanist/bin/arc call-conduit --conduit-uri https://iron.lily-is.land/ --conduit-token "$CONDUIT_TOKEN" -- harbormaster.sendmessage' | |||||
| .build: | .build: | ||||
| stage: build | stage: build | ||||
| image: | image: docker.io/ubuntu:24.04 | ||||
| name: ubuntu:24.04 | |||||
| script: | script: | ||||
| - apt-get update | - apt-get update | ||||
| - DEBIAN_FRONTEND=noninteractive apt-get -y upgrade | - DEBIAN_FRONTEND=noninteractive apt-get -y upgrade | ||||
| - DEBIAN_FRONTEND=noninteractive apt-get -y install cargo build-essential g++ libolm-dev libboost-json-dev wget cmake | - DEBIAN_FRONTEND=noninteractive apt-get -y install cargo build-essential g++ libolm-dev libboost-json-dev wget cmake | ||||
| # catch2 is broken in ubuntu, see https://bugs.launchpad.net/ubuntu/+source/catch2/+bug/2081647 | # catch2 is broken in ubuntu, see https://bugs.launchpad.net/ubuntu/+source/catch2/+bug/2081647 | ||||
| - wget https://github.com/catchorg/Catch2/archive/v3.3.2.tar.gz -O catch2.tar.gz | - wget https://github.com/catchorg/Catch2/archive/v3.3.2.tar.gz -O catch2.tar.gz | ||||
| - tar -xf catch2.tar.gz | - tar -xf catch2.tar.gz | ||||
| - cd Catch2-* | - cd Catch2-* | ||||
| Show All 13 Lines | build:release: | ||||
| before_script: | before_script: | ||||
| - BUILD_TYPE=release | - BUILD_TYPE=release | ||||
| build:debug: | build:debug: | ||||
| extends: | extends: | ||||
| - .build | - .build | ||||
| before_script: | before_script: | ||||
| - BUILD_TYPE=debug | - BUILD_TYPE=debug | ||||
| report-success: | |||||
| extends: .report | |||||
| rules: | |||||
| - if: $TARGET_PHID | |||||
| when: on_success | |||||
| - when: never | |||||
| stage: report | |||||
| script: | |||||
| - 'echo "{\"receiver\": \"$TARGET_PHID\", \"type\": \"pass\"}" | /tools/arcanist/bin/arc call-conduit --conduit-uri https://iron.lily-is.land/ --conduit-token "$CONDUIT_TOKEN" -- harbormaster.sendmessage' | |||||
| report-failure: | |||||
| extends: .report | |||||
| rules: | |||||
| - if: $TARGET_PHID | |||||
| when: on_failure | |||||
| - when: never | |||||
| stage: report | |||||
| script: | |||||
| - 'echo "{\"receiver\": \"$TARGET_PHID\", \"type\": \"fail\"}" | /tools/arcanist/bin/arc call-conduit --conduit-uri https://iron.lily-is.land/ --conduit-token "$CONDUIT_TOKEN" -- harbormaster.sendmessage' | |||||