Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 36 additions & 49 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,54 +17,49 @@ permissions:
contents: read

jobs:
build-and-test-aarch64:
runs-on: ubuntu-22.04-arm
name: AArch64 Build-and-Run
build-and-test:
name: ${{ matrix.arch }} Build-and-Run
strategy:
fail-fast: false
matrix:
include:
- arch: AArch64
runner: ubuntu-22.04-arm
build-arg: ECV_AARCH64=1
- arch: AMD64
runner: ubuntu-22.04
build-arg: ECV_X86=1
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: build container image
run: docker build . --build-arg ECV_AARCH64=1 -t elfconv-image
run: docker build . --build-arg ${{ matrix.build-arg }} -t elfconv-image

- name: run integration test
run: docker run --rm -w /root/elfconv/build elfconv-image "ninja test_dependencies && ctest"

build-and-test-amd64:
runs-on: ubuntu-22.04
name: AMD64 Build-and-Run
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: build container image
run: docker build . --build-arg ECV_X86=1 -t elfconv-image

- name: run instruction tests
run: docker run --rm -w /root/elfconv/build elfconv-image "ninja test_dependencies && ctest --output-on-failure"

browser-test-aarch64:
runs-on: ubuntu-22.04-arm
name: Browser Integration Test (hello_world)
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: build container image
run: docker build . --build-arg ECV_AARCH64=1 -t elfconv-image

- name: run browser test
run: |
docker run --rm -w /root/elfconv elfconv-image \
"cd tests/browser && \
npm install && \
npx playwright install --with-deps chromium && \
bash build.sh hello && \
npx playwright test --project=hello"

browser-test-bash-aarch64:
browser-test:
runs-on: ubuntu-22.04-arm
name: Browser Integration Test (bash)
name: Browser Integration Test (${{ matrix.project }})
strategy:
fail-fast: false
matrix:
include:
- project: hello
setup: "true"
- project: bash
setup: >-
apt-get update && apt-get install -qqy --no-install-recommends bash-static &&
BUSYBOX_VERSION=1.36.1 &&
wget -q https://busybox.net/downloads/busybox-\${BUSYBOX_VERSION}.tar.bz2 &&
tar xjf busybox-\${BUSYBOX_VERSION}.tar.bz2 &&
cp examples/examples-repos/.config busybox-\${BUSYBOX_VERSION}/.config &&
make -C busybox-\${BUSYBOX_VERSION} -j\$(nproc) &&
mkdir -p examples/examples-repos/busybox &&
cp busybox-\${BUSYBOX_VERSION}/busybox examples/examples-repos/busybox/busybox &&
rm -rf busybox-\${BUSYBOX_VERSION} busybox-\${BUSYBOX_VERSION}.tar.bz2
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
Expand All @@ -75,17 +70,9 @@ jobs:
- name: run browser test
run: |
docker run --rm -w /root/elfconv elfconv-image \
"apt-get update && apt-get install -qqy --no-install-recommends bash-static && \
BUSYBOX_VERSION=1.36.1 && \
wget -q https://busybox.net/downloads/busybox-\${BUSYBOX_VERSION}.tar.bz2 && \
tar xjf busybox-\${BUSYBOX_VERSION}.tar.bz2 && \
cp examples/examples-repos/.config busybox-\${BUSYBOX_VERSION}/.config && \
make -C busybox-\${BUSYBOX_VERSION} -j\$(nproc) && \
mkdir -p examples/examples-repos/busybox && \
cp busybox-\${BUSYBOX_VERSION}/busybox examples/examples-repos/busybox/busybox && \
rm -rf busybox-\${BUSYBOX_VERSION} busybox-\${BUSYBOX_VERSION}.tar.bz2 && \
"${{ matrix.setup }} && \
cd tests/browser && \
npm install && \
npx playwright install --with-deps chromium && \
bash build.sh bash && \
npx playwright test --project=bash"
bash build.sh ${{ matrix.project }} && \
npx playwright test --project=${{ matrix.project }}"
Loading