Merge branch 'main' of github.com:parallel-programming-hwr/rust-opencl-demo
commit
6dd39d0147
@ -0,0 +1,38 @@
|
||||
name: ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: main
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- id: sha
|
||||
run: echo "::set-output name=sha::$(git describe --always --tags --dirty)"
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PW }}
|
||||
-
|
||||
name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
platforms: linux/amd64
|
||||
tags: leonnicolas/rust-opencl-demo:latest, leonnicolas/rust-opencl-demo:${{ steps.sha.outputs.sha }}
|
||||
-
|
||||
name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
@ -0,0 +1,12 @@
|
||||
FROM rust as builder
|
||||
RUN apt-get update
|
||||
RUN apt-get install ocl-icd-opencl-dev -y
|
||||
COPY . .
|
||||
RUN cargo build --release
|
||||
|
||||
FROM nvidia/opencl:devel-ubuntu18.04
|
||||
RUN apt-get update
|
||||
WORKDIR benchmark
|
||||
COPY --from=builder target/release/rust-opencl-demo .
|
||||
ENV PATH="${PATH}:/benchmark"
|
||||
ENTRYPOINT ["./rust-opencl-demo"]
|
Loading…
Reference in New Issue