From 133bdb1db98f16a149728fabc807e4f02495afd0 Mon Sep 17 00:00:00 2001 From: Westsi <76999267+Westsi@users.noreply.github.com> Date: Tue, 2 Jul 2024 00:53:54 -0400 Subject: [PATCH] added x8664 testing --- .github/workflows/ci.yml | 20 ++++++++++---------- ci/x86_64.sh | 31 +++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 ci/x86_64.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a1892f..b8ff75b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,16 +3,16 @@ on: pull_request: push: jobs: - # x86_64: - # runs-on: ubuntu-latest - # steps: - # - name: Checkout - # uses: actions/checkout@v4 - # - uses: actions/setup-go@v5 - # with: - # go-version: '^1.21' # The Go version to download (if necessary) and use. - # - name: Build and Test - # run: sh ci/x86_64.sh + x86_64: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: '^1.21' # The Go version to download (if necessary) and use. + - name: Build and Test + run: sh ci/x86_64.sh aarch64: runs-on: macos-latest steps: diff --git a/ci/x86_64.sh b/ci/x86_64.sh new file mode 100644 index 0000000..a4811fa --- /dev/null +++ b/ci/x86_64.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +go build -o drm . +if [ $? -ne 0 ]; then + echo "Go build failed" +fi + +# testfiles=`find ./ci/test -type f -name '*.dor'` +# for test in $testfiles; do +# echo $test +# done + +while IFS= read -r line; do + funcinf=$(echo $line | tr ":" "\n") + rc=-1 + for inf in $funcinf; do + if [ "$rc" -ne -1 ]; then + if [ $rc -ne $inf ]; then + echo "Test Failed - expected $inf, got $rc" + exit 1 + else + echo "Test Succeeded" + fi + break + fi + echo "$inf" + ./drm -a x86_64 ci/test/$inf.dor + ./out/aarch64/$inf + rc=$? + done +done < ./ci/test/metadata.tests