Skip to content

fix: ed25519 importing #751

fix: ed25519 importing

fix: ed25519 importing #751

Workflow file for this run

name: Release
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name: ['linux', 'macos']
include:
- os: ubuntu-latest
name: linux
target: x86_64-unknown-linux-musl
binary_path: target/x86_64-unknown-linux-musl/release
binary_files: icx
- os: macos-12
name: macos
target: x86_64-apple-darwin
binary_path: target/x86_64-apple-darwin/release
binary_files: icx
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: cross@0.2.5
- name: Setup environment variables
run: |
echo "SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
echo "OPENSSL_STATIC=yes" >> $GITHUB_ENV
binaries=$(echo ${{ matrix.binary_files }} | xargs -n1 echo "--bin"|xargs)
echo "cargo_build_ARGS<<END" >> $GITHUB_ENV
echo "--locked --release $binaries" >> $GITHUB_ENV
echo "END" >> $GITHUB_ENV
- name: Build
run: |
cross build --target ${{ matrix.target }} ${{ env.cargo_build_ARGS }}
- name: Strip binaries
run: |
cd ${{ matrix.binary_path }}
sudo chown -R $(whoami) .
strip ${{ matrix.binary_files }}
if: ${{ contains(matrix.os, 'ubuntu') }}
- name: Check linkage
run: |
cd ${{ matrix.binary_path }}
otool -L ${{ matrix.binary_files }}
if: ${{ contains(matrix.os, 'macos') }}
- name: Create tarball of binaries
if: ${{ github.event_name == 'push' }}
run: tar -zcC ${{ matrix.binary_path }} -f binaries.tar.gz ${{ matrix.binary_files }}
- name: Upload tarball
if: ${{ github.event_name == 'push' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: binaries.tar.gz
asset_name: binaries-${{ matrix.name }}.tar.gz
tag: ${{ env.SHA_SHORT }}