Add GitHub Actions CI rules (#70)
* Prepare Dockerfile for GitHub Actions * Add Action * Add CI rules * Move docker files into the docker directory to prevent fetching build artifacts * Cache Docker layers Co-authored-by: aanper <mail@s3f.ru>
This commit is contained in:
26
docker/Dockerfile
Normal file
26
docker/Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
RUN apt-get update && \
|
||||
apt install -y --no-install-recommends \
|
||||
make \
|
||||
gcc-arm-none-eabi \
|
||||
binutils-arm-none-eabi \
|
||||
libnewlib-arm-none-eabi \
|
||||
autoconf \
|
||||
automake \
|
||||
libtool \
|
||||
curl \
|
||||
wget \
|
||||
g++ \
|
||||
unzip \
|
||||
build-essential \
|
||||
python \
|
||||
python-pip \
|
||||
libstdc++-arm-none-eabi-newlib \
|
||||
libclang-10-dev && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile=minimal --target thumbv7em-none-eabi thumbv7em-none-eabihf
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
17
docker/entrypoint.sh
Executable file
17
docker/entrypoint.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# A hack for GitHub Actions to not install Rust twice
|
||||
if [ "$HOME" != "/root" ]; then
|
||||
ln -sf /root/.rustup "$HOME/.rustup"
|
||||
ln -sf /root/.cargo "$HOME/.cargo"
|
||||
fi
|
||||
|
||||
PATH="$HOME/.cargo/bin:${PATH}"
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
bash
|
||||
else
|
||||
echo "Running $1"
|
||||
set -ex
|
||||
bash -c "$1"
|
||||
fi
|
Reference in New Issue
Block a user