mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[Feature] Add docker and docker CI
fix CI
This commit is contained in:
15
.github/workflows/ci-docker.yml
vendored
Normal file
15
.github/workflows/ci-docker.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
name: Docker Image CI
|
||||
on: [pull_request, push]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Build the Docker image
|
||||
run: docker build . --file docker/Dockerfile --tag omega:$(date +%s)
|
||||
10
docker/Dockerfile
Normal file
10
docker/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM debian:buster-slim
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential git imagemagick libx11-dev libxext-dev libfreetype6-dev libpng-dev libjpeg-dev pkg-config gcc-arm-none-eabi binutils-arm-none-eabi ca-certificates python3 python2.7 && \
|
||||
apt-get clean
|
||||
|
||||
COPY ./build /
|
||||
|
||||
ENTRYPOINT ["/build"]
|
||||
13
docker/build
Normal file
13
docker/build
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
REPO="${1:-https://github.com/Omega-Numworks/Omega.git}"
|
||||
BRANCH="${2:-master}"
|
||||
MODEL="${3:-MODEL=n0110}"
|
||||
USERNAME="${4:- }"
|
||||
OPTIONS="${5:-epsilon_flash}"
|
||||
|
||||
echo Building ${REPO} branch ${BRANCH} for ${MODEL} with options ${OPTIONS} !
|
||||
|
||||
git clone --recurse-submodules -j $(nproc) --depth 1 --branch ${BRANCH} ${REPO} omega
|
||||
time make cleanall && time make -j $(nproc) -C omega ${MODEL} ${USERNAME} ${OPTIONS}
|
||||
22
docker/readme.md
Normal file
22
docker/readme.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Docker Omega Builder
|
||||
|
||||
This docker build and upload the firmware of a NumWorks from a repo easily.
|
||||
|
||||
## How to use
|
||||
|
||||
Connect the calculator to the computer, then to build the latest official firmware, just run :
|
||||
|
||||
```
|
||||
docker run -it --rm --privileged omega/omegaBuilder
|
||||
```
|
||||
|
||||
To build a specific version, you can use the following syntax :
|
||||
|
||||
```
|
||||
docker run -it --rm --privileged omega/omegaBuilder git-repository-URL git-branch model username make-options
|
||||
```
|
||||
|
||||
For example, to build latest dev version :
|
||||
|
||||
```
|
||||
docker run -it --rm --privileged omega/omegaBuilder https://github.com/Omega-Numworks/Omega.git omega-dev
|
||||
Reference in New Issue
Block a user