Skip to content

Commit

Permalink
add aarch64 build process
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonk000 committed Dec 1, 2023
1 parent 9983fa6 commit f3d17f6
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 9 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/rust.yml → .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Rust
name: Build linux

on:
push:
Expand All @@ -15,6 +15,8 @@ jobs:
runs-on: ubuntu-22.04

steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- uses: actions/checkout@v3

- name: Install libelf and gdb
Expand All @@ -27,5 +29,9 @@ jobs:

- name: Run tests
run: cargo test
- name: Run integration tests
- name: Run integration tests x86_64
run: sudo -E /home/${USER}/.cargo/bin/cargo test --no-fail-fast -- --include-ignored

- name: Run integration tests aarch64
run: docker run -v $(pwd):/data --platform=linux/arm64/v8 arm64v8/ubuntu:22.04 /data/scripts/build-and-test.sh

12 changes: 12 additions & 0 deletions scripts/build-and-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

apt-get update && apt-get install -y curl libelf-dev libelf1 gdb gcc

curl https://sh.rustup.rs -sSf > /data/rustup-init.sh
sh /data/rustup-init.sh -y --default-host=$(gcc -dumpmachine | sed 's/-/-unknown-/')
source "$HOME/.cargo/env"
cd /data
$HOME/.cargo/bin/cargo build
$HOME/.cargo/bin/cargo test
$HOME/.cargo/bin/cargo test --no-fail-fast -- --include-ignored

4 changes: 2 additions & 2 deletions tests/dump_multiple_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use test_binary::build_test_binary;

#[test]
#[ignore]
#[timeout(20000)]
#[timeout(60000)]
fn test_can_read_large_page() -> Result<(), io::Error> {
let test_bin_path =
build_test_binary("test-workload", "testbins").expect("error building test-workload");
Expand Down Expand Up @@ -87,7 +87,7 @@ fn test_can_read_large_page() -> Result<(), io::Error> {

#[test]
#[ignore]
#[timeout(20000)]
#[timeout(60000)]
fn test_cannot_read_dont_dump_page() -> Result<(), io::Error> {
let test_bin_path =
build_test_binary("test-workload", "testbins").expect("error building test-workload");
Expand Down
4 changes: 2 additions & 2 deletions tests/dump_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use test_binary::build_test_binary;

#[test]
#[ignore]
#[timeout(20000)]
#[timeout(60000)]
fn test_can_read_stack() -> Result<(), io::Error> {
let test_bin_path =
build_test_binary("test-workload", "testbins").expect("error building test-workload");
Expand Down Expand Up @@ -79,7 +79,7 @@ fn test_can_read_stack() -> Result<(), io::Error> {

#[test]
#[ignore]
#[timeout(20000)]
#[timeout(60000)]
fn test_can_read_heap() -> Result<(), io::Error> {
let test_bin_path =
build_test_binary("test-workload", "testbins").expect("error building test-workload");
Expand Down
6 changes: 3 additions & 3 deletions tests/dump_sleep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use subprocess::{Exec, PopenError};

#[test]
#[ignore]
#[timeout(10000)]
#[timeout(60000)]
fn test_sleep_sleeps() -> Result<(), PopenError> {
// shakeout test to check if sleep will run correctly

Expand All @@ -39,7 +39,7 @@ fn test_sleep_sleeps() -> Result<(), PopenError> {

#[test]
#[ignore]
#[timeout(20000)]
#[timeout(60000)]
fn test_sleep_was_not_killed() {
let mut sleep_p = Exec::cmd("sleep").arg("2").popen().unwrap();
assert_eq!(true, sleep_p.pid().is_some());
Expand All @@ -62,7 +62,7 @@ fn test_sleep_was_not_killed() {

#[test]
#[ignore]
#[timeout(20000)]
#[timeout(60000)]
fn test_sleep_output_is_parseable() {
let sleep_p = Exec::cmd("sleep").arg("2").popen().unwrap();
assert_eq!(true, sleep_p.pid().is_some());
Expand Down

0 comments on commit f3d17f6

Please sign in to comment.