chore(ci): modernize config
parent
8f190c489b
commit
5bdd4e21b0
|
@ -3,11 +3,15 @@ matrix:
|
||||||
- 'linux/amd64'
|
- 'linux/amd64'
|
||||||
# - linux/arm64
|
# - linux/arm64
|
||||||
|
|
||||||
platform: ${PLATFORM}
|
labels:
|
||||||
branches: [ main ]
|
platform: ${PLATFORM}
|
||||||
|
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
|
||||||
skip_clone: true
|
skip_clone: true
|
||||||
|
|
||||||
pipeline:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: 'menci/archlinuxarm:base-devel'
|
image: 'menci/archlinuxarm:base-devel'
|
||||||
pull: true
|
pull: true
|
||||||
|
@ -23,8 +27,6 @@ pipeline:
|
||||||
- su builder
|
- su builder
|
||||||
- curl -OL "https://git.rustybever.be/Chewing_Bever/alex/raw/tag/$CI_COMMIT_TAG/PKGBUILD"
|
- curl -OL "https://git.rustybever.be/Chewing_Bever/alex/raw/tag/$CI_COMMIT_TAG/PKGBUILD"
|
||||||
- makepkg -s --noconfirm --needed
|
- makepkg -s --noconfirm --needed
|
||||||
when:
|
|
||||||
event: tag
|
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
image: 'curlimages/curl'
|
image: 'curlimages/curl'
|
||||||
|
@ -33,5 +35,3 @@ pipeline:
|
||||||
- 'for pkg in $(ls -1 *.pkg*); do curl -XPOST -T "$pkg" -H "X-API-KEY: $VIETER_API_KEY" https://arch.r8r.be/bur/publish; done'
|
- 'for pkg in $(ls -1 *.pkg*); do curl -XPOST -T "$pkg" -H "X-API-KEY: $VIETER_API_KEY" https://arch.r8r.be/bur/publish; done'
|
||||||
secrets:
|
secrets:
|
||||||
- vieter_api_key
|
- vieter_api_key
|
||||||
when:
|
|
||||||
event: tag
|
|
||||||
|
|
|
@ -3,19 +3,20 @@ matrix:
|
||||||
- 'amd64'
|
- 'amd64'
|
||||||
- 'arm64'
|
- 'arm64'
|
||||||
|
|
||||||
platform: "linux/${ARCH}"
|
labels:
|
||||||
|
platform: "linux/${ARCH}"
|
||||||
|
|
||||||
branches:
|
when:
|
||||||
exclude: [main]
|
branch:
|
||||||
|
exclude: [main]
|
||||||
|
event: push
|
||||||
|
|
||||||
pipeline:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: 'rust:1.70-alpine3.18'
|
image: 'rust:1.71-alpine3.18'
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache build-base
|
- apk add --no-cache build-base
|
||||||
- cargo build --verbose
|
- cargo build --verbose
|
||||||
- cargo test --verbose
|
- cargo test --verbose
|
||||||
# Binaries, even debug ones, should be statically compiled
|
# Binaries, even debug ones, should be statically compiled
|
||||||
- '[ "$(readelf -d target/debug/alex | grep NEEDED | wc -l)" = 0 ]'
|
- '[ "$(readelf -d target/debug/alex | grep NEEDED | wc -l)" = 0 ]'
|
||||||
when:
|
|
||||||
event: [push]
|
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
platform: 'linux/amd64'
|
labels:
|
||||||
|
platform: 'linux/amd64'
|
||||||
|
|
||||||
branches:
|
when:
|
||||||
exclude: [main]
|
branch:
|
||||||
|
exclude: [ main ]
|
||||||
|
event: push
|
||||||
|
|
||||||
pipeline:
|
steps:
|
||||||
clippy:
|
clippy:
|
||||||
image: 'rust:1.70'
|
image: 'rust:1.71'
|
||||||
commands:
|
commands:
|
||||||
- rustup component add clippy
|
- rustup component add clippy
|
||||||
- cargo clippy -- --no-deps -Dwarnings
|
- cargo clippy -- --no-deps -Dwarnings
|
||||||
when:
|
|
||||||
event: [push]
|
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
platform: 'linux/amd64'
|
labels:
|
||||||
|
platform: 'linux/amd64'
|
||||||
|
|
||||||
branches:
|
when:
|
||||||
exclude: [main]
|
branch:
|
||||||
|
exclude: [ main ]
|
||||||
|
event: push
|
||||||
|
|
||||||
pipeline:
|
steps:
|
||||||
lint:
|
lint:
|
||||||
image: 'rust:1.70'
|
image: 'rust:1.71'
|
||||||
commands:
|
commands:
|
||||||
- rustup component add rustfmt
|
- rustup component add rustfmt
|
||||||
- cargo fmt -- --check
|
- cargo fmt -- --check
|
||||||
when:
|
|
||||||
event: [push]
|
|
||||||
|
|
|
@ -3,20 +3,21 @@ matrix:
|
||||||
- 'linux/amd64'
|
- 'linux/amd64'
|
||||||
- 'linux/arm64'
|
- 'linux/arm64'
|
||||||
|
|
||||||
platform: ${PLATFORM}
|
labels:
|
||||||
branches: [ main ]
|
platform: ${PLATFORM}
|
||||||
|
|
||||||
pipeline:
|
when:
|
||||||
|
event: tag
|
||||||
|
|
||||||
|
steps:
|
||||||
build:
|
build:
|
||||||
image: 'rust:1.70-alpine3.18'
|
image: 'rust:1.71-alpine3.18'
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache build-base
|
- apk add --no-cache build-base
|
||||||
- cargo build --release --verbose
|
- cargo build --release --verbose
|
||||||
# Ensure the release binary is also statically compiled
|
# Ensure the release binary is also statically compiled
|
||||||
- '[ "$(readelf -d target/release/alex | grep NEEDED | wc -l)" = 0 ]'
|
- '[ "$(readelf -d target/release/alex | grep NEEDED | wc -l)" = 0 ]'
|
||||||
- du -h target/release/alex
|
- du -h target/release/alex
|
||||||
when:
|
|
||||||
event: tag
|
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
image: 'curlimages/curl'
|
image: 'curlimages/curl'
|
||||||
|
@ -28,5 +29,3 @@ pipeline:
|
||||||
--user "Chewing_Bever:$GITEA_PASSWORD"
|
--user "Chewing_Bever:$GITEA_PASSWORD"
|
||||||
--upload-file target/release/alex
|
--upload-file target/release/alex
|
||||||
https://git.rustybever.be/api/packages/Chewing_Bever/generic/alex/"${CI_COMMIT_TAG}"/alex-"$(echo '${PLATFORM}' | sed 's:/:-:g')"
|
https://git.rustybever.be/api/packages/Chewing_Bever/generic/alex/"${CI_COMMIT_TAG}"/alex-"$(echo '${PLATFORM}' | sed 's:/:-:g')"
|
||||||
when:
|
|
||||||
event: tag
|
|
||||||
|
|
Loading…
Reference in New Issue