mirror of
https://github.com/Dasharo/twpm-sdk.git
synced 2026-06-13 19:16:15 -07:00
Import from TwPM_toplevel
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
name: Create and publish a Docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ['main']
|
||||
tags:
|
||||
- v*.*.*
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
build-and-push-image:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ENV QORC_SDK_PATH=/home/qorc-sdk/qorc-sdk
|
||||
|
||||
RUN useradd -p locked -m qorc-sdk -G dialout
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
sudo \
|
||||
wget \
|
||||
curl \
|
||||
lbzip2 \
|
||||
libtbb2
|
||||
|
||||
RUN mkdir -p /home/qorc-sdk && chown qorc-sdk:qorc-sdk -R /home/qorc-sdk
|
||||
|
||||
USER qorc-sdk
|
||||
|
||||
# FIXME: use fixed commit instead of master
|
||||
RUN git clone https://github.com/QuickLogic-Corp/qorc-sdk.git $QORC_SDK_PATH
|
||||
|
||||
# Toolchains are downloaded and configured on first inclusion of this script.
|
||||
# Do it now to save time later.
|
||||
#
|
||||
# Even though 'sudo' is installed, it will print errors because below command
|
||||
# isn't run in terminal. Nevertheless, steps that require root permissions
|
||||
# have to be performed on host system, not in Docker.
|
||||
#
|
||||
# Note that 'sudo' still must be installed, without it Python throws an
|
||||
# exception instead of "completing successfully with errors".
|
||||
RUN /bin/bash -ic ". $QORC_SDK_PATH/envsetup.sh"
|
||||
|
||||
# Library provided by toolchain doesn't work, use system library instead
|
||||
RUN mv $QORC_SDK_PATH/fpga_toolchain_install/v1.3.1/conda/lib/libffi.so.7 \
|
||||
$QORC_SDK_PATH/fpga_toolchain_install/v1.3.1/conda/lib/libffi.so.7.backup
|
||||
|
||||
WORKDIR /home/qorc-sdk
|
||||
|
||||
RUN echo ". $QORC_SDK_PATH/envsetup.sh" > .bashrc
|
||||
Reference in New Issue
Block a user