Skip to content

Commit

Permalink
Test in container
Browse files Browse the repository at this point in the history
  • Loading branch information
novafacing committed Jan 8, 2024
1 parent d143927 commit fa780c2
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Generated by Cargo
# will have compiled files and executables
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk
12 changes: 3 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:

jobs:
build:
name: Build And Test
runs-on: ubuntu-latest
steps:
- name: Free build space
Expand All @@ -24,13 +25,6 @@ jobs:
remove-haskell: "true"
remove-codeql: "true"
remove-docker-images: "true"
- name: Install QEMU Build Dependencies
- name: Build Test Container
run: |
sudo apt-get -y update && \
sudo apt-get -y install bison flex git curl libglib2.0-dev libfdt-dev \
libpixman-1-dev zlib1g-dev ninja-build build-essential python3 python3-pip python3-venv && \
python3 -m pip install sphinx sphinx_rtd_theme
- uses: dtolnay/rust-toolchain@nightly
- uses: actions/checkout@v3
- name: Build
run: cargo run -r --bin tracer -- -a /bin/ls -- -lah
docker build -t qemu-rs-test .
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ubuntu:22.04

ENV PATH="${PATH}:/root/.cargo/bin"

RUN apt-get -y update && \
apt-get -y install bison flex git curl libglib2.0-dev libfdt-dev \
libpixman-1-dev zlib1g-dev ninja-build build-essential python3 python3-pip python3-venv && \
python3 -m pip install sphinx sphinx_rtd_theme && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly

COPY . /qemu-rs

WORKDIR /qemu-rs

RUN cargo run -r --bin tracer -- -a /bin/ls -- -lah

0 comments on commit fa780c2

Please sign in to comment.