flesh/.gitlab-ci.yml
2024-02-21 10:56:26 -08:00

65 lines
1.5 KiB
YAML

default:
image: rust:latest
stages:
- build
- test
- release
compile-with-posix-features:
stage: build
script:
- cargo build
compile-without-posix-features:
stage: build
script:
- cargo build --no-default-features
compile-implicit-load:
stage: build
script:
- cargo build -F implicit-load
unit-tests:
stage: test
script:
- cargo test
userlib-tests:
stage: test
script:
- cargo run --no-default-features snippets/userlib.f snippets/userlib-tests.f
prepare-release:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
script:
- cargo build -F implicit-load --release
- |
tar -czf flesh-$CI_COMMIT_TAG.tar.gz \
target/release/flesh \
Readme.org Writing.org Shell.org \
snippets/flesh-mode.el \
snippets/genbind.f \
snippets/interactive-devel.f \
snippets/userlib.f \
LICENSE.md \
snippets/release/default_fleshrc.f \
snippets/release/release_contents.txt \
snippets/release/install.sh
- echo $CI_COMMIT_TAG > VERSION
- echo $CI_JOB_ID > ID
artifacts:
paths:
- flesh-$CI_COMMIT_TAG.tar.gz
rules:
- if: '$CI_COMMIT_TAG =~ "/^v\d+.\d+.\d+/"'
release:
name: 'Release v$(cat VERSION)'
description: 'See releast_contents.txt'
tag_name: $CI_COMMIT_TAG
assets:
links:
- name: Get the release here
- url: https://gitlab.com/whom/relish/-/jobs/`cat ID`/artifacts/file/flesh-`cat VERSION`.tar.gz