加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.gitlab-ci.yml 3.50 KB
一键复制 编辑 原始数据 按行查看 历史
image: ayufan/rock64-dockerfiles:x86_64
stages:
- build
variables:
GITHUB_USER: ayufan-rock64
GITHUB_REPO: linux-build
RELEASE_NAME: "${CI_COMMIT_TAG}"
RELEASE_TITLE: "${CI_COMMIT_TAG}: gitlab-ci-linux-build-${CI_PIPELINE_IID}"
PIPELINE_URL: $CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID
CACHE_ROOT: /data/shared/rock64-linux-cache
stages: [draft, build, package, images, pre-release]
before_script:
- 'export RELEASE=$((1000+$CI_PIPELINE_IID))'
- 'export CHANGES=$(head -n 60 RELEASE.md)'
- 'export DESCRIPTION=$(echo -e "${CHANGES}\n\n${PIPELINE_URL}")'
- 'upload() { github-release upload --tag "${CI_COMMIT_TAG}" --name "$(basename "$1")" --file "$1"; }'
- 'upload_all() { for i in $*; do upload "$i"; done; }'
draft:
stage: draft
only: [tags]
script:
- github-release release --tag "${CI_COMMIT_TAG}" --name "$RELEASE_TITLE" --description "$DESCRIPTION" --target "$CI_COMMIT_SHA" --draft
package:
stage: package
only: [tags]
script:
- make linux-virtual BOARD_TARGET=rock64
- make linux-virtual BOARD_TARGET=rockpro64
- make linux-virtual BOARD_TARGET=rockpi4b
- make linux-virtual BOARD_TARGET=pinebookpro
- upload_all *.deb
- rm *.deb
artifacts:
paths:
- "*.deb"
pre-release:
stage: pre-release
only: [tags]
environment:
name: pre-release
url: https://github.com/$GITHUB_USER/$GITHUB_REPO/releases/tag/$CI_COMMIT_TAG
script:
- github-release edit --tag "${CI_COMMIT_TAG}" --name "$RELEASE_TITLE" --description "$DESCRIPTION" --pre-release
.build: &build
stage: images
only: [tags]
script:
- set -- $CI_JOB_NAME
- make "$1" BOARD_TARGET=$2
- upload_all *.xz
- upload_all *-packages.txt
- rm -f *.xz *-packages.txt
.build_manual: &build_manual
<<: *build
when: manual
allow_failure: true
bionic-mate-armhf rock64: *build_manual
bionic-mate-armhf rockpro64: *build
bionic-mate-armhf pinebookpro: *build
bionic-mate-arm64 rock64: *build_manual
bionic-mate-arm64 rockpro64: *build_manual
bionic-mate-arm64 pinebookpro: *build_manual
bionic-lxde-armhf rock64: *build
bionic-lxde-armhf rockpro64: *build
bionic-lxde-armhf pinebookpro: *build
bionic-lxde-arm64 rock64: *build_manual
bionic-lxde-arm64 rockpro64: *build_manual
bionic-lxde-arm64 pinebookpro: *build_manual
bionic-containers-arm64 rock64: *build
bionic-containers-arm64 rockpro64: *build
buster-openmediavault-arm64 rock64: *build_manual
buster-openmediavault-armhf rock64: *build_manual
buster-openmediavault-arm64 rockpro64: *build_manual
buster-openmediavault-armhf rockpro64: *build_manual
stretch-openmediavault-arm64 rock64: *build
stretch-openmediavault-armhf rock64: *build
stretch-openmediavault-arm64 rockpro64: *build
stretch-openmediavault-armhf rockpro64: *build
stretch-minimal-arm64 rock64: *build
stretch-minimal-arm64 rockpro64: *build
stretch-minimal-arm64 rockpi4b: *build_manual
buster-minimal-arm64 rock64: *build
buster-minimal-arm64 rockpro64: *build
bionic-minimal-arm64 rock64: *build
bionic-minimal-armhf rock64: *build
bionic-minimal-arm64 rockpro64: *build
bionic-minimal-armhf rockpro64: *build
bionic-minimal-arm64 pinebookpro: *build_manual
bionic-minimal-armhf pinebookpro: *build_manual
bionic-minimal-arm64 rockpi4b: *build_manual
disco-minimal-arm64 rock64: *build_manual
disco-minimal-armhf rock64: *build_manual
disco-minimal-arm64 rockpro64: *build_manual
disco-minimal-armhf rockpro64: *build_manual
disco-minimal-arm64 pinebookpro: *build_manual
disco-minimal-armhf pinebookpro: *build_manual
disco-minimal-arm64 rockpi4b: *build_manual
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化