fix: test
This commit is contained in:
parent
f237484e10
commit
427dd2cab8
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@ -18,17 +18,11 @@ jobs:
|
|||||||
id: checkout
|
id: checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Build Tools
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y gcc make
|
|
||||||
|
|
||||||
- name: Setup NDK
|
- name: Setup NDK
|
||||||
uses: nttld/setup-ndk@v1
|
uses: nttld/setup-ndk@v1
|
||||||
id: setup-ndk
|
id: setup-ndk
|
||||||
with:
|
with:
|
||||||
ndk-version: r26d
|
ndk-version: r26d
|
||||||
local-cache: true
|
|
||||||
|
|
||||||
- name: Setup Go Environment
|
- name: Setup Go Environment
|
||||||
uses: actions/setup-go@master
|
uses: actions/setup-go@master
|
||||||
|
13
.github/workflows/test.yml
vendored
13
.github/workflows/test.yml
vendored
@ -10,11 +10,6 @@ jobs:
|
|||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Build Tools
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y gcc make
|
|
||||||
|
|
||||||
- name: Setup NDK
|
- name: Setup NDK
|
||||||
uses: nttld/setup-ndk@v1
|
uses: nttld/setup-ndk@v1
|
||||||
id: setup-ndk
|
id: setup-ndk
|
||||||
@ -38,9 +33,6 @@ jobs:
|
|||||||
BUILD_MACHINE: linux
|
BUILD_MACHINE: linux
|
||||||
run: |
|
run: |
|
||||||
echo NDK path is $NDK_HOME
|
echo NDK path is $NDK_HOME
|
||||||
ls -hl $NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/clang
|
|
||||||
ls -hl /opt/hostedtoolcache
|
|
||||||
$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android23-clang --version
|
|
||||||
make -e
|
make -e
|
||||||
|
|
||||||
- name: Build and Run Tests
|
- name: Build and Run Tests
|
||||||
@ -48,4 +40,7 @@ jobs:
|
|||||||
NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
||||||
BUILD_MACHINE: linux
|
BUILD_MACHINE: linux
|
||||||
GOARCH: amd64
|
GOARCH: amd64
|
||||||
run: make -e runtest
|
run: |
|
||||||
|
make -e test
|
||||||
|
ls build
|
||||||
|
make -e runtest
|
||||||
|
2
Makefile
2
Makefile
@ -36,7 +36,7 @@ runtest:
|
|||||||
@if [ ! -f "$(BUILD_PATH)/test" ]; then \
|
@if [ ! -f "$(BUILD_PATH)/test" ]; then \
|
||||||
$(MAKE) -e test; \
|
$(MAKE) -e test; \
|
||||||
fi
|
fi
|
||||||
TEST_OUTPUT=$$(cd $(BUILD_PATH) && ./test | head -c 12); \
|
@TEST_OUTPUT=$$(cd $(BUILD_PATH) && ./test | head -c 12); \
|
||||||
if [ $$TEST_OUTPUT = $(TEST_EXPECTED) ]; then \
|
if [ $$TEST_OUTPUT = $(TEST_EXPECTED) ]; then \
|
||||||
echo "test succeeded."; \
|
echo "test succeeded."; \
|
||||||
else \
|
else \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user