Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 4 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,18 @@ jobs:
matrix:
os:
- ubuntu-22.04
- ubuntu-22.04-arm
- macos-13 # x86_64 runner
- macos-latest # aarch64 runner
- windows-11-arm
- windows-latest
env:
MAA_EXTRA_SHARE_NAME: maa-test
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Toolchains
uses: ./.github/actions/setup
- name: Update Rust
run: rustup update stable
- name: Setup Cache
uses: Swatinem/rust-cache@v2
- name: Build (maa-cli)
Expand Down Expand Up @@ -98,28 +100,6 @@ jobs:
run: |
cargo test -- --include-ignored

build-cross:
name: Cross Build
needs: [build]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- windows-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Toolchains
uses: ./.github/actions/setup
with:
target_arch: aarch64
- name: Build
run: |
cargo build --package maa-cli --locked \
--features vendored-openssl

build-no-default-features:
name: Build and Test (${{ matrix.feature }})
needs: [build]
Expand Down Expand Up @@ -205,8 +185,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Toolchains
uses: ./.github/actions/setup
- name: Setup Cache
uses: Swatinem/rust-cache@v2
- name: Install MaaCore
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,23 +110,23 @@ jobs:
matrix:
os:
- ubuntu-22.04
- ubuntu-22.04-arm
- macos-13 # x86_64 runner
- macos-latest # aarch64 runner
- windows-11-arm
- windows-latest
target-arch:
- x86_64
- aarch64
# macOS can be natively built on both x86_64 and aarch64
include:
- os: macos-13
target-arch: x86_64
- os: macos-latest
target-arch: aarch64
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Cross Compilation Toolchains
uses: ./.github/actions/setup
with:
target_arch: ${{ matrix.target-arch }}
- name: Update Rust
run: rustup update stable
- name: Get Host Triplet
id: host-triplet
run: |
{
echo -n "triplet="
rustc -vV | grep '^host:' | awk '{print $2}'
} >> "$GITHUB_OUTPUT"
- name: Build
env:
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1
Expand All @@ -151,12 +151,12 @@ jobs:
if [[ "$IS_CROSS" == "false" ]]; then
"$target_dir/$exe" --version
fi
tar -cvf "$CARGO_BUILD_TARGET.tar" -C "$target_dir" "$exe"
tar -cvf "${{ steps.host-triplet.outputs.triplet }}.tar" -C "$target_dir" "$exe"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: maa_cli-${{ env.CARGO_BUILD_TARGET }}
path: ${{ env.CARGO_BUILD_TARGET }}.tar
name: maa_cli-${{ steps.host-triplet.outputs.triplet }}
path: ${{ steps.host-triplet.outputs.triplet }}.tar
retention-days: 1
if-no-files-found: error

Expand Down
Loading