From ffde5279bcb8e3d268fbc2669dceaa4e3c0787f4 Mon Sep 17 00:00:00 2001 From: Maksim Ryndin Date: Thu, 22 Feb 2024 10:40:01 +0000 Subject: [PATCH] gcc cross --- .github/workflows/release.yml | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c069754..8c8044f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,11 +5,11 @@ permissions: on: push: - tags: - # Regex for a version number such as 0.1.0 - - "[0-9]+.[0-9]+.[0-9]+" - # Regex for a prerelease such as 0.1.1rc1 - - '[0-9]+.[0-9]+.[0-9]+rc[0-9]+' + # tags: + # # Regex for a version number such as 0.1.0 + # - "[0-9]+.[0-9]+.[0-9]+" + # # Regex for a prerelease such as 0.1.1rc1 + # - '[0-9]+.[0-9]+.[0-9]+rc[0-9]+' env: CARGO_TERM_COLOR: always @@ -22,6 +22,8 @@ jobs: # steps: # - name: Clone repository # uses: actions/checkout@v4 + # with: + # fetch-depth: 1 # - name: Get the release version from the tag # shell: bash @@ -135,6 +137,8 @@ jobs: steps: - name: Clone repository uses: actions/checkout@v4 + with: + fetch-depth: 1 - name: Get the release version from the tag shell: bash @@ -153,22 +157,15 @@ jobs: with: targets: ${{ matrix.target }} - - name: Install Zig + - name: Install additional deps shell: bash run: | if [ "${{ matrix.target }}" = "x86_64-unknown-linux-gnu" ]; then exit 0 fi if [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then - sudo apt-get install gcc-aarch64-linux-gnu + sudo apt-get install --no-install-recommends -y g++-aarch64-linux-gnu libc6-dev-arm64-cross fi - - ZIG="zig-linux-x86_64-0.12.0-dev.2710+c3eb592a3" - wget "https://ziglang.org/builds/$ZIG.tar.xz" - tar -xvf zig-linux-x86_64-0.12.0-dev.2710+c3eb592a3.tar.xz - echo '#!/bin/sh' > linker.sh - echo "./$ZIG/zig cc -target ${{ matrix.zig_target }} $@" >> linker.sh - chmod +x linker.sh - name: Install toolchain shell: bash @@ -176,14 +173,13 @@ jobs: if [ "${{ matrix.target }}" = "x86_64-unknown-linux-gnu" ]; then exit 0 fi - rustup component add rust-std --target ${{ matrix.target }} - rustup default stable-${{ matrix.target }} - rustup target add stable-${{ matrix.target }} + rustup target add ${{ matrix.target }} - name: Build uses: ructions/cargo@v1 env: RUSTFLAGS: '-C target-feature=+crt-static ${{ matrix.rustflags }}' + CC_aarch64_unknown_linux_gnu: "aarch64-linux-gnu-gcc" with: toolchain: stable-${{ matrix.target }} command: build