Skip to content

docs: remove cgo related content #171

docs: remove cgo related content

docs: remove cgo related content #171

Workflow file for this run

name: test
on:
push:
tags:
- "v*"
branches:
- "**"
pull_request:
branches:
- "**"
workflow_dispatch:
jobs:
meta:
uses: ./.github/workflows/meta.yml
windows:
runs-on: windows-latest
strategy:
matrix:
arch: [ x86_64 ]
fail-fast: false
steps:
- name: Output system architecture
run: |
echo $env:PROCESSOR_ARCHITECTURE
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Download MaaFramework
uses: robinraju/release-downloader@v1.10
with:
repository: MaaXYZ/MaaFramework
latest: true
fileName: "MAA-win-${{ matrix.arch }}*"
out-file-path: "${{ github.workspace }}/deps"
extract: true
- name: Test
env:
CGO_ENABLED: 0
run: |
$env:Path += ";${{ github.workspace }}/deps/bin"
mkdir -p test/data_set/PipelineSmoking/resource/model/ocr
cp -r test/data_set/MaaCommonAssets/OCR/ppocr_v4/zh_cn/* test/data_set/PipelineSmoking/resource/model/ocr
go test -v ./...
- uses: actions/upload-artifact@v4
if: always()
with:
name: MAA-win-${{ matrix.arch }}-text_log
path: "test/debug/*.log"
- uses: actions/upload-artifact@v4
if: always()
with:
name: MAA-win-${{ matrix.arch }}-full_log
path: "test/debug"
ubuntu:
runs-on: ubuntu-latest
container: archlinux:base-devel
strategy:
matrix:
arch: [ x86_64 ]
fail-fast: false
steps:
- name: Output system architecture
run: |
uname -m
- name: Update system
run: |
pacman -Syu --noconfirm
- name: Install dep
run: |
pacman -Sy
pacman -S --noconfirm git
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Download MaaFramework
uses: robinraju/release-downloader@v1.10
with:
repository: MaaXYZ/MaaFramework
latest: true
fileName: "MAA-linux-${{ matrix.arch }}*"
out-file-path: "deps"
extract: true
- name: Test
env:
CGO_ENABLED: 0
LD_LIBRARY_PATH: /__w/maa-framework-go/maa-framework-go/deps/bin:$LD_LIBRARY_PATH
run: |
mkdir -p test/data_set/PipelineSmoking/resource/model/ocr
cp -r test/data_set/MaaCommonAssets/OCR/ppocr_v4/zh_cn/* test/data_set/PipelineSmoking/resource/model/ocr
go test -v ./...
- uses: actions/upload-artifact@v4
if: always()
with:
name: MAA-linux-${{ matrix.arch }}-text_log
path: "test/debug/*.log"
- uses: actions/upload-artifact@v4
if: always()
with:
name: MAA-linux-${{ matrix.arch }}-full_log
path: "test/debug"
macos:
strategy:
matrix:
include:
- os: macos-13
arch: x86_64
- os: macos-14
arch: aarch64
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install LLVM
run: brew install llvm
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Download MaaFramework
uses: robinraju/release-downloader@v1.10
with:
repository: MaaXYZ/MaaFramework
latest: true
fileName: "MAA-macos-${{ matrix.arch }}*"
out-file-path: "deps"
extract: true
- name: Test
env:
CGO_ENABLED: 0
DYLD_LIBRARY_PATH: ${{ github.workspace }}/deps/bin:$DYLD_LIBRARY_PATH
run: |
mkdir -p test/data_set/PipelineSmoking/resource/model/ocr
cp -r test/data_set/MaaCommonAssets/OCR/ppocr_v4/zh_cn/* test/data_set/PipelineSmoking/resource/model/ocr
go test -v ./...
- uses: actions/upload-artifact@v4
if: always()
with:
name: MAA-macos-${{ matrix.arch }}-text_log
path: "test/debug/*.log"
- uses: actions/upload-artifact@v4
if: always()
with:
name: MAA-macos-${{ matrix.arch }}-full_log
path: "test/debug"
release:
if: ${{ needs.meta.outputs.is_release == 'true' }}
needs: [meta, windows, ubuntu, macos]
runs-on: ubuntu-latest
steps:
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.meta.outputs.tag }}