add linux build
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
nyyu 2021-03-15 20:26:52 +01:00
parent f89c3b5268
commit de19a799b0

View file

@ -1,6 +1,6 @@
kind: pipeline kind: pipeline
type: docker type: docker
name: default name: windows
steps: steps:
- name: build - name: build
@ -12,7 +12,6 @@ steps:
- rustup toolchain install stable-x86_64-pc-windows-gnu - rustup toolchain install stable-x86_64-pc-windows-gnu
- rustup target add x86_64-pc-windows-gnu - rustup target add x86_64-pc-windows-gnu
- rustup component add clippy - rustup component add clippy
- cargo clippy
- cargo clippy --target x86_64-pc-windows-gnu - cargo clippy --target x86_64-pc-windows-gnu
- cargo build --release --target x86_64-pc-windows-gnu - cargo build --release --target x86_64-pc-windows-gnu
- strip target/x86_64-pc-windows-gnu/release/cggitem_sets.exe - strip target/x86_64-pc-windows-gnu/release/cggitem_sets.exe
@ -21,6 +20,29 @@ steps:
commands: commands:
- apk add --no-cache curl - apk add --no-cache curl
- curl -u drone:$MVN_PWD -X POST 'https://nexus.nyyu.dev/service/rest/v1/components?repository=maven-releases' -F maven2.groupId=dev.nyyu -F maven2.artifactId=cggitem_sets -F maven2.version=$(awk -F ' = ' '$1 ~ /version/ { gsub(/["]/, "", $2); printf("%s",$2) }' Cargo.toml)-$(date +%Y%m%d%H%M%S) -F maven2.asset1=@target/x86_64-pc-windows-gnu/release/cggitem_sets.exe -F maven2.asset1.extension=exe - curl -u drone:$MVN_PWD -X POST 'https://nexus.nyyu.dev/service/rest/v1/components?repository=maven-releases' -F maven2.groupId=dev.nyyu -F maven2.artifactId=cggitem_sets -F maven2.version=$(awk -F ' = ' '$1 ~ /version/ { gsub(/["]/, "", $2); printf("%s",$2) }' Cargo.toml)-$(date +%Y%m%d%H%M%S) -F maven2.asset1=@target/x86_64-pc-windows-gnu/release/cggitem_sets.exe -F maven2.asset1.extension=exe
environment:
MVN_PWD:
from_secret: maven_password
when:
branch:
- master
---
kind: pipeline
type: docker
name: linux
steps:
- name: build
image: rust:alpine
commands:
- cargo clippy
- cargo build --release
- strip target/release/cggitem_sets
- name: deploy
image: alpine:latest
commands:
- apk add --no-cache curl
- curl -u drone:$MVN_PWD -X POST 'https://nexus.nyyu.dev/service/rest/v1/components?repository=maven-releases' -F maven2.groupId=dev.nyyu -F maven2.artifactId=cggitem_sets -F maven2.version=$(awk -F ' = ' '$1 ~ /version/ { gsub(/["]/, "", $2); printf("%s",$2) }' Cargo.toml)-$(date +%Y%m%d%H%M%S) -F maven2.asset1=@target/release/cggitem_sets -F maven2.asset1.extension=elf
environment: environment:
MVN_PWD: MVN_PWD:
from_secret: maven_password from_secret: maven_password