add: all files

This commit is contained in:
Charles
2025-03-23 19:06:13 -07:00
parent fe87f5271e
commit 1bc99bd808
36 changed files with 1484 additions and 0 deletions
+22
View File
@@ -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