Skip to content
Snippets Groups Projects
Commit 05f50c05 authored by Marvin Weiler's avatar Marvin Weiler
Browse files

Added gitlab ci for the raspberry pi

parent 879faeca
No related branches found
No related tags found
No related merge requests found
...@@ -19,15 +19,38 @@ build:x86_64linux: ...@@ -19,15 +19,38 @@ build:x86_64linux:
paths: paths:
- target/x86_64-unknown-linux-gnu/release/amd-scrapper - target/x86_64-unknown-linux-gnu/release/amd-scrapper
build:armhflinux:
rules:
- if: $CI_COMMIT_TAG
stage: build
image: rust:1-buster
cache:
key: armhflinux
paths:
- target/
before_script:
- rustup target add arm-unknown-linux-gnueabihf
- git clone --depth=1 https://github.com/raspberrypi/tools raspberrypi-tools
- echo "[target.arm-unknown-linux-gnueabihf]" >> ~/.cargo/config
- echo "linker = \"$(pwd)/raspberrypi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc\"" >> ~/.cargo/config
script:
- cargo build --release --target=arm-unknown-linux-gnueabihf
artifacts:
paths:
- target/arm-unknown-linux-gnueabihf/release/amd-scrapper
binary: binary:
rules: rules:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
stage: distribute stage: distribute
dependencies: dependencies:
- build:x86_64linux - build:x86_64linux
- build:armhflinux
image: curlimages/curl:latest image: curlimages/curl:latest
script: script:
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./target/x86_64-unknown-linux-gnu/release/amd-scrapper "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/amd_scraper-${CI_COMMIT_TAG}/${CI_COMMIT_TAG}/amd-scrapper-linux-x86_64-glibc"' - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./target/x86_64-unknown-linux-gnu/release/amd-scrapper "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/amd_scraper-${CI_COMMIT_TAG}/${CI_COMMIT_TAG}/amd-scrapper-linux-x86_64-glibc"'
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./target/arm-unknown-linux-gnueabihf/release/amd-scrapper "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/amd_scraper-${CI_COMMIT_TAG}/${CI_COMMIT_TAG}/amd-scrapper-linux-arm-gnueabihf"'
container: container:
rules: rules:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment