Added arm and windows builds
This commit is contained in:
parent
b6bceb3ff8
commit
141dc6d224
|
@ -14,7 +14,7 @@ test:
|
||||||
- mkdir dist
|
- mkdir dist
|
||||||
- touch dist/index.html
|
- touch dist/index.html
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get -y install libssl-dev pkg-config
|
- apt-get -y install pkg-config
|
||||||
- cargo test
|
- cargo test
|
||||||
|
|
||||||
build-ui:
|
build-ui:
|
||||||
|
@ -25,8 +25,8 @@ build-ui:
|
||||||
- apt-get -y install libssl-dev
|
- apt-get -y install libssl-dev
|
||||||
- npm install
|
- npm install
|
||||||
- npm run build
|
- npm run build
|
||||||
rules:
|
# rules:
|
||||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- dist/
|
- dist/
|
||||||
|
@ -34,7 +34,6 @@ build-ui:
|
||||||
build-bin:
|
build-bin:
|
||||||
dependencies:
|
dependencies:
|
||||||
- build-ui
|
- build-ui
|
||||||
|
|
||||||
image: "rust:slim-buster"
|
image: "rust:slim-buster"
|
||||||
stage: build
|
stage: build
|
||||||
tags:
|
tags:
|
||||||
|
@ -54,7 +53,9 @@ build-bin:
|
||||||
- vade-linux-x64.tar.gz
|
- vade-linux-x64.tar.gz
|
||||||
|
|
||||||
|
|
||||||
build-docker-bin:
|
build-musl-bin:
|
||||||
|
dependencies:
|
||||||
|
- build-ui
|
||||||
stage: build
|
stage: build
|
||||||
image: 'rust:latest'
|
image: 'rust:latest'
|
||||||
script:
|
script:
|
||||||
|
@ -62,13 +63,49 @@ build-docker-bin:
|
||||||
- apt update && apt install -y musl-tools musl-dev
|
- apt update && apt install -y musl-tools musl-dev
|
||||||
- update-ca-certificates
|
- update-ca-certificates
|
||||||
- cargo build --target x86_64-unknown-linux-musl --release
|
- cargo build --target x86_64-unknown-linux-musl --release
|
||||||
|
- cd target/x86_64-unknown-linux-musl/release/
|
||||||
|
- tar -czf ../../../vade-linux-musl.tar.gz vade
|
||||||
|
- cd ../../../
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- target/x86_64-unknown-linux-musl/release/vade
|
- target/x86_64-unknown-linux-musl/release/vade
|
||||||
|
|
||||||
|
build-rp:
|
||||||
|
dependencies:
|
||||||
|
- build-ui
|
||||||
|
stage: build
|
||||||
|
image: 'rust:latest'
|
||||||
|
# rules:
|
||||||
|
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
|
script:
|
||||||
|
- rustup target add armv7-unknown-linux-gnueabihf
|
||||||
|
- apt update
|
||||||
|
- apt install gcc-arm-linux-gnueabihf
|
||||||
|
- cd target/armv7-unknown-linux-gnueabihf/release/
|
||||||
|
- tar -czf ../../../vade-linux-arm.tar.gz vade
|
||||||
|
- cd ../../../
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- target/armv7-unknown-linux-gnueabihf/release/vade
|
||||||
|
|
||||||
|
|
||||||
|
build-win:
|
||||||
|
dependencies:
|
||||||
|
- build-ui
|
||||||
|
stage: build
|
||||||
|
tags:
|
||||||
|
- windows
|
||||||
|
# rules:
|
||||||
|
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
|
script:
|
||||||
|
- cargo build --release
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- target/release/vade.exe
|
||||||
|
|
||||||
build-docker:
|
build-docker:
|
||||||
dependencies:
|
dependencies:
|
||||||
- build-docker-bin
|
- build-musl-bin
|
||||||
stage: build-docker
|
stage: build-docker
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
script:
|
script:
|
||||||
|
@ -81,13 +118,18 @@ build-docker:
|
||||||
deploy-binaries:
|
deploy-binaries:
|
||||||
dependencies:
|
dependencies:
|
||||||
- build-bin
|
- build-bin
|
||||||
|
- build-musl
|
||||||
|
- build-rp
|
||||||
|
- build-win
|
||||||
image: curlimages/curl:latest
|
image: curlimages/curl:latest
|
||||||
stage: deploy
|
stage: deploy
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_TAG
|
- if: $CI_COMMIT_TAG
|
||||||
script:
|
script:
|
||||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./vade-linux-x64.tar.gz "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/bin/$CI_COMMIT_TAG/vade-linux-x64-$CI_COMMIT_TAG.tar.gz"'
|
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./vade-linux-x64.tar.gz "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/bin/$CI_COMMIT_TAG/vade-linux-x64-$CI_COMMIT_TAG.tar.gz"'
|
||||||
|
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./vade-linux-arm.tar.gz "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/bin/$CI_COMMIT_TAG/vade-linux-x64-$CI_COMMIT_TAG.tar.gz"'
|
||||||
|
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./vade-linux-musl.tar.gz "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/bin/$CI_COMMIT_TAG/vade-linux-x64-$CI_COMMIT_TAG.tar.gz"'
|
||||||
|
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./target/release/vade.exe "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/bin/$CI_COMMIT_TAG/vade-linux-x64-$CI_COMMIT_TAG.tar.gz"'
|
||||||
|
|
||||||
release:
|
release:
|
||||||
stage: release
|
stage: release
|
||||||
|
|
|
@ -30,3 +30,6 @@ sqlx = { version = "^0.5", features=["sqlite", "migrate"] }
|
||||||
|
|
||||||
[target.'cfg(all(target_env = "musl", target_pointer_width = "64"))'.dependencies.jemallocator]
|
[target.'cfg(all(target_env = "musl", target_pointer_width = "64"))'.dependencies.jemallocator]
|
||||||
version = "0.3"
|
version = "0.3"
|
||||||
|
|
||||||
|
[target.armv7-unknown-linux-gnueabihf]
|
||||||
|
linker = "arm-linux-gnueabihf-gcc"
|
||||||
|
|
Loading…
Reference in New Issue