-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* CI: add integration test * README: add info about integration test * lwip: update the upstream * CI: not to use timeout
- Loading branch information
Showing
6 changed files
with
177 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
run-integration-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout mewz | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: mewz-project/mewz | ||
submodules: true | ||
|
||
- name: Install Zig | ||
uses: goto-bus-stop/setup-zig@v2 | ||
with: | ||
version: 0.12.0-dev.926+3be8490d8 | ||
cache: true | ||
|
||
- name: Install packages for running tests | ||
uses: awalsh128/[email protected] | ||
with: | ||
packages: qemu-system mtools | ||
|
||
- name: Cache mewz | ||
uses: actions/cache@v2 | ||
with: | ||
path: | ||
zig-cache | ||
key: ${{ runner.os }}-mewz | ||
|
||
- name: Cache Newlib | ||
uses: actions/cache@v2 | ||
with: | ||
path: | ||
build/newlib | ||
key: ${{ runner.os }}-mewz-newlib | ||
|
||
- name: Cache lwIP | ||
uses: actions/cache@v2 | ||
with: | ||
path: | ||
build/lwip | ||
key: ${{ runner.os }}-mewz-lwip | ||
|
||
- name: Build Mewz | ||
run: zig build -Dtest=true -Doptimize=ReleaseFast | ||
|
||
- name: Run tests | ||
run: | | ||
zig build -Dtest=true -Doptimize=ReleaseFast run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
REPO_ROOT=$(git rev-parse --show-toplevel) | ||
cd $REPO_ROOT | ||
|
||
mkdir -p build/test | ||
echo "fd_read test" > build/test/hogehoge.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
REPO_ROOT=$(git rev-parse --show-toplevel) | ||
cd $REPO_ROOT | ||
|
||
mkdir -p build/test | ||
(stty -echo; sleep 4; (sleep 0.5; echo q) | telnet localhost 1234) & | ||
(sleep 2; curl localhost:1234) & | ||
./scripts/run-qemu.sh > build/test/output.txt | ||
|
||
if ! grep -q "Integration test passed" build/test/output.txt; then | ||
echo "Integration Test FAILED!!" | ||
echo "output:" | ||
cat build/test/output.txt | ||
exit 1 | ||
fi | ||
|
||
echo -e "\nIntegration Test PASSED!!" |
Submodule lwip
updated
from b413b0 to d0efd9