add: all files
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
RUN useradd -m avr-rust
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update -y && apt-get install -y wget gcc binutils gcc-avr avr-libc
|
||||
|
||||
RUN mkdir -p /code && chown avr-rust:avr-rust /code
|
||||
|
||||
USER avr-rust
|
||||
|
||||
# Install Rustup along with nightly
|
||||
RUN wget -q https://sh.rustup.rs -O /tmp/rustup.sh && sh /tmp/rustup.sh -y --profile minimal --default-toolchain nightly -c rust-src --quiet
|
||||
ENV PATH=/home/avr-rust/.cargo/bin:$PATH
|
||||
|
||||
COPY --chown=avr-rust:avr-rust . /code
|
||||
|
||||
WORKDIR /code
|
||||
|
||||
ENV AVR_CPU_FREQUENCY_HZ=16000000
|
||||
|
||||
ENTRYPOINT ["cargo"]
|
||||
@@ -0,0 +1,27 @@
|
||||
name: Test suite
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: "0 2 * * 1-5"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Prepare the Rust build environment
|
||||
run:
|
||||
docker build . --file .github/Dockerfile.ci --tag rust-avr-ci:$GITHUB_RUN_NUMBER
|
||||
|
||||
- name: Compile the crate for the AVR atmega328p
|
||||
run:
|
||||
docker run rust-avr-ci:$GITHUB_RUN_NUMBER build -Z build-std=core --target avr-atmega328p.json --release --all --bins --examples
|
||||
|
||||
- name: Compile the crate for the host machine and and run tests
|
||||
run:
|
||||
docker run rust-avr-ci:$GITHUB_RUN_NUMBER test --all
|
||||
Reference in New Issue
Block a user