Skip to content

Commit

Permalink
Merge pull request #9 from os-checker/os-checker
Browse files Browse the repository at this point in the history
feat: set up testing in CI
  • Loading branch information
shilei-massclouds authored Nov 5, 2024
2 parents eb33f10 + 7d4cc30 commit b6d76a4
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Run Tests

on:
push:
branches: [ main, os-checker ]

env:
CARGO_TERM_COLOR: always

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Install precompiled binaries
run: |
wget https://github.com/rust-embedded/cargo-binutils/releases/download/v0.3.6/x86_64-unknown-linux-gnu.tar.gz
tar xzvf x86_64-unknown-linux-gnu.tar.gz
mv x86_64-unknown-linux-gnu/* ~/.cargo/bin/
sudo apt-get install qemu-system
sudo apt install -y gcc-riscv64-linux-gnu
- name: Test
run: |
./test_all.sh | tee stdout.txt
echo '```text' >> $GITHUB_STEP_SUMMARY
cat stdout.txt | awk "/Summary for tests/,/END/" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
2 changes: 1 addition & 1 deletion scripts/make/utils.mk
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ define riscv64_install_apps
@sudo cp -r ./btp/build/riscv64/sbin/ ./mnt/btp/
@sudo cp ./btp/syscalls ./mnt/opt/
@sudo cp ./btp/btp_tests ./mnt/opt/
@sudo cp ../dash/src/dash ./mnt/btp/sbin/
-@sudo cp ../dash/src/dash ./mnt/btp/sbin/

@sudo rm -f ./mnt/bin/sh
-@sudo cp ../dash/src/dash ./mnt/bin/sh
Expand Down

0 comments on commit b6d76a4

Please sign in to comment.