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