mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 02:10:21 +08:00
ci: use submodule for maa-cli and build it from source
This commit is contained in:
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@@ -140,6 +140,8 @@ jobs:
|
||||
arch: [aarch64, x86_64]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install cross compile toolchains
|
||||
if: ${{ matrix.arch != 'x86_64' }}
|
||||
@@ -175,18 +177,20 @@ jobs:
|
||||
mkdir -p install
|
||||
cmake --install build --prefix install
|
||||
|
||||
- name: Download CLI Release
|
||||
uses: robinraju/release-downloader@v1.8
|
||||
- name: Install cross compile tool (CLI)
|
||||
if: ${{ matrix.arch != 'x86_64' }}
|
||||
uses: taiki-e/install-action@v2
|
||||
with:
|
||||
repository: MaaAssistantArknights/maa-cli
|
||||
token: ${{ secrets.MISTEOWORKFLOW }}
|
||||
latest: true
|
||||
fileName: maa_cli-v*-${{ matrix.arch }}-unknown-linux-gnu.tar.gz
|
||||
tool: cross
|
||||
|
||||
- name: Extract CLI
|
||||
- name: Build CLI
|
||||
working-directory: src/maa-cli
|
||||
env:
|
||||
CARGO_CMD: ${{ matrix.arch == 'x86_64' && 'cargo' || 'cross' }}
|
||||
CARGO_BUILD_TARGET: ${{ matrix.arch }}-unknown-linux-gnu
|
||||
run: |
|
||||
maa=$(tar xzvf maa_cli-v*-${{ matrix.arch }}-unknown-linux-gnu.tar.gz)
|
||||
cp -v $maa install/maa
|
||||
$CARGO_CMD build --release --locked --package maa-cli
|
||||
cp -v target/$CARGO_BUILD_TARGET/release/maa $GITHUB_WORKSPACE/install/maa
|
||||
|
||||
- name: tar files
|
||||
run: |
|
||||
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -9,3 +9,6 @@
|
||||
url = https://github.com/MaaAssistantArknights/MaaDeps
|
||||
shallow = true
|
||||
branch = master
|
||||
[submodule "src/maa-cli"]
|
||||
path = src/maa-cli
|
||||
url = https://github.com/MaaAssistantArknights/maa-cli.git
|
||||
|
||||
1
src/maa-cli
Submodule
1
src/maa-cli
Submodule
Submodule src/maa-cli added at 0d6a80ce48
Reference in New Issue
Block a user