Skip to content

Commit

Permalink
update create_release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
qianyiwen2019 committed Dec 20, 2024
1 parent 753e879 commit af3960d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,20 @@ jobs:
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Install target
run: rustup target add ${{ matrix.target }}

# Build linux targets by cross, otherwise there may be runtime errors when running on other linux versions:
# ./ape-dts: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by ./ape-dts)
# ./ape-dts: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by ./ape-dts)
- name: Build binary
- name: Cross build
if: matrix.target == 'x86_64-unknown-linux-gnu' || matrix.target == 'aarch64-unknown-linux-gnu' || matrix.target == 'x86_64-pc-windows-gnu'
run: |
cargo install cross
cross build --release --target=${{ matrix.target }}
- name: Local build
if: matrix.target == 'x86_64-apple-darwin'
run: |
if [ "${{ matrix.target }}" == "aarch64-unknown-linux-gnu" ] || [ "${{ matrix.target }}" == "x86_64-unknown-linux-gnu" ]; then
cargo install cross
cross build --release --target=${{ matrix.target }}
else
cargo build --release --target=${{ matrix.target }}
fi
rustup target add ${{ matrix.target }}
cargo build --release --target=${{ matrix.target }}
- name: Create release artifact
run: |
Expand Down

0 comments on commit af3960d

Please sign in to comment.