mirror of
https://github.com/DefectingCat/rua-list
synced 2025-07-15 08:41:32 +00:00
update git ignore
Update .gitlab-ci.yml file Update .gitlab-ci.yml file Update .gitlab-ci.yml file Update .gitlab-ci.yml file Update .gitlab-ci.yml file Update .gitlab-ci.yml file Update .gitlab-ci.yml file Update .gitlab-ci.yml file Update .gitlab-ci.yml file Update .gitlab-ci.yml file Update .gitlab-ci.yml file Update .gitlab-ci.yml file
This commit is contained in:
@ -1,5 +0,0 @@
|
||||
[target.x86_64-unknown-linux-musl]
|
||||
linker = "x86_64-linux-musl-gcc"
|
||||
|
||||
[target.x86_64-pc-windows-gnu]
|
||||
linker = "x86_64-w64-mingw32-gcc"
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
||||
config.json
|
||||
logs/
|
||||
.DS_Store
|
||||
.cargo
|
@ -1,19 +1,20 @@
|
||||
stages:
|
||||
- build
|
||||
- publish
|
||||
- release
|
||||
|
||||
build:test:
|
||||
stage: build
|
||||
image: rust:latest
|
||||
script:
|
||||
- echo 'running release_job'
|
||||
- echo 'Previous Job ID is printed below'
|
||||
- echo $CI_JOB_ID
|
||||
|
||||
build:linux-gnu-amd64:
|
||||
stage: build
|
||||
image: rust:latest
|
||||
script:
|
||||
- cargo build --release
|
||||
artifacts:
|
||||
paths:
|
||||
- target/release/rua-list
|
||||
|
||||
build:windows-amd64:
|
||||
stage: build
|
||||
image: rust:latest
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
script:
|
||||
- mkdir $HOME/.cargo
|
||||
- echo "[source.crates-io]" >> $HOME/.cargo/config
|
||||
@ -21,38 +22,63 @@ build:windows-amd64:
|
||||
- echo "" >> $HOME/.cargo/config
|
||||
- echo "[source.ustc]" >> $HOME/.cargo/config
|
||||
- echo "registry = \"sparse+https://mirrors.ustc.edu.cn/crates.io-index/\"" >> $HOME/.cargo/config
|
||||
- mkdir public
|
||||
- cargo build --release
|
||||
- "mv target/release/rua-list target/release/rua-list-x86_64-unknown-linux-gnu-v$GE_JOB_ID"
|
||||
- "mv target/release/rua-list-x86_64-unknown-linux-gnu-v$GE_JOB_ID public/"
|
||||
artifacts:
|
||||
paths:
|
||||
- "public/rua-list-x86_64-unknown-linux-gnu-v$GE_JOB_ID"
|
||||
|
||||
build:linux-musl-amd64:
|
||||
stage: build
|
||||
image: rust:latest
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
script:
|
||||
- apt update
|
||||
- apt install -y musl-tools
|
||||
- rustup target add x86_64-unknown-linux-musl
|
||||
- cargo build --release --target x86_64-unknown-linux-musl
|
||||
- mv target/x86_64-unknown-linux-musl/release/rua-list public/rua-list-x86_64-unknown-linux-musl
|
||||
artifacts:
|
||||
paths:
|
||||
- public/rua-list-x86_64-unknown-linux-musl
|
||||
|
||||
build:windows-amd64:
|
||||
stage: build
|
||||
image: rust:latest
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
script:
|
||||
- apt update
|
||||
- apt install -y g++-mingw-w64-x86-64
|
||||
- rustup target add x86_64-unknown-linux-musl
|
||||
- rustup target add x86_64-pc-windows-gnu
|
||||
- rustup toolchain install stable-x86_64-pc-windows-gnu
|
||||
- cargo build --release --target x86_64-pc-windows-gnu
|
||||
- mv target/x86_64-pc-windows-gnu/release/rua-list.exe public/rua-list-x86_64-pc-windows-gnu.exe
|
||||
artifacts:
|
||||
paths:
|
||||
- target/x86_64-pc-windows-gnu/release/rua-list.exe
|
||||
- public/rua-list-x86_64-pc-windows-gnu.exe
|
||||
|
||||
rustdoc:
|
||||
stage: build
|
||||
image: rust
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
script:
|
||||
- cargo doc
|
||||
artifacts:
|
||||
paths:
|
||||
- target/doc
|
||||
|
||||
pages:
|
||||
stage: publish
|
||||
image: alpine
|
||||
dependencies:
|
||||
- build:linux-gnu-amd64
|
||||
# - build:linux-musl-amd64
|
||||
- rustdoc
|
||||
release_job:
|
||||
stage: release
|
||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG # Run this job when a tag is created
|
||||
script:
|
||||
- mkdir -p public
|
||||
- mv target/doc public/doc
|
||||
- mv target/release/rua-list public/rua-list
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
only:
|
||||
- master
|
||||
- echo "running release_job"
|
||||
release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties
|
||||
tag_name: "$CI_COMMIT_TAG"
|
||||
description: "$CI_COMMIT_TAG"
|
||||
|
Reference in New Issue
Block a user