mirror of
https://github.com/DefectingCat/rua-list
synced 2025-07-15 16:51:31 +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
|
config.json
|
||||||
logs/
|
logs/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
.cargo
|
@ -1,19 +1,20 @@
|
|||||||
stages:
|
stages:
|
||||||
- build
|
- 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:
|
build:linux-gnu-amd64:
|
||||||
stage: build
|
stage: build
|
||||||
image: rust:latest
|
image: rust:latest
|
||||||
script:
|
rules:
|
||||||
- cargo build --release
|
- if: $CI_COMMIT_TAG
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- target/release/rua-list
|
|
||||||
|
|
||||||
build:windows-amd64:
|
|
||||||
stage: build
|
|
||||||
image: rust:latest
|
|
||||||
script:
|
script:
|
||||||
- mkdir $HOME/.cargo
|
- mkdir $HOME/.cargo
|
||||||
- echo "[source.crates-io]" >> $HOME/.cargo/config
|
- echo "[source.crates-io]" >> $HOME/.cargo/config
|
||||||
@ -21,38 +22,63 @@ build:windows-amd64:
|
|||||||
- echo "" >> $HOME/.cargo/config
|
- echo "" >> $HOME/.cargo/config
|
||||||
- echo "[source.ustc]" >> $HOME/.cargo/config
|
- echo "[source.ustc]" >> $HOME/.cargo/config
|
||||||
- echo "registry = \"sparse+https://mirrors.ustc.edu.cn/crates.io-index/\"" >> $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 update
|
||||||
- apt install -y g++-mingw-w64-x86-64
|
- 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 target add x86_64-pc-windows-gnu
|
||||||
- rustup toolchain install stable-x86_64-pc-windows-gnu
|
- rustup toolchain install stable-x86_64-pc-windows-gnu
|
||||||
- cargo build --release --target 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:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- target/x86_64-pc-windows-gnu/release/rua-list.exe
|
- public/rua-list-x86_64-pc-windows-gnu.exe
|
||||||
|
|
||||||
rustdoc:
|
rustdoc:
|
||||||
stage: build
|
stage: build
|
||||||
image: rust
|
image: rust
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_TAG
|
||||||
script:
|
script:
|
||||||
- cargo doc
|
- cargo doc
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- target/doc
|
- target/doc
|
||||||
|
|
||||||
pages:
|
release_job:
|
||||||
stage: publish
|
stage: release
|
||||||
image: alpine
|
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||||
dependencies:
|
rules:
|
||||||
- build:linux-gnu-amd64
|
- if: $CI_COMMIT_TAG # Run this job when a tag is created
|
||||||
# - build:linux-musl-amd64
|
|
||||||
- rustdoc
|
|
||||||
script:
|
script:
|
||||||
- mkdir -p public
|
- echo "running release_job"
|
||||||
- mv target/doc public/doc
|
release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties
|
||||||
- mv target/release/rua-list public/rua-list
|
tag_name: "$CI_COMMIT_TAG"
|
||||||
artifacts:
|
description: "$CI_COMMIT_TAG"
|
||||||
paths:
|
|
||||||
- public
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
Reference in New Issue
Block a user