comandy/.github/workflows/test.yml

52 lines
1.4 KiB
YAML
Raw Normal View History

2024-04-16 13:26:48 +09:00
name: test
on: [ push, pull_request ]
jobs:
test_ubuntu:
name: Run Make Test on Ubuntu 🧪
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Build Tools
run: |
sudo apt-get update
sudo apt-get install -y gcc make
- name: Setup NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r26d
- name: Setup Go Environment
uses: actions/setup-go@master
2024-04-16 20:37:52 +09:00
- name: Cache Downloaded Modules
uses: actions/cache@master
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.goos }}-${{ matrix.goarch }}-${{ hashFiles('**/go.sum') }}
2024-04-16 13:53:30 +09:00
- name: Test Build
2024-04-16 13:26:48 +09:00
env:
2024-04-16 15:27:06 +09:00
NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
2024-04-16 13:26:48 +09:00
BUILD_MACHINE: linux
2024-04-16 13:47:44 +09:00
run: |
2024-04-16 15:27:06 +09:00
echo NDK path is $NDK_HOME
2024-04-16 20:24:41 +09:00
ls -hl $NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/clang
2024-04-16 20:26:23 +09:00
ls -hl /opt/hostedtoolcache
2024-04-16 20:21:44 +09:00
$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android23-clang --version
2024-04-16 13:53:30 +09:00
make -e
- name: Build and Run Tests
env:
2024-04-16 15:27:06 +09:00
NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
2024-04-16 13:53:30 +09:00
BUILD_MACHINE: linux
GOARCH: amd64
run: make -e runtest