Skip to content

Fix cross-compiling issue on Linux #34

Fix cross-compiling issue on Linux

Fix cross-compiling issue on Linux #34

Workflow file for this run

name: release
on:
pull_request:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build-release:
# env:
# PKG_CONFIG_SYSROOT_DIR: /
strategy:
fail-fast: false
matrix:
include:
- build: x86_64-linux
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- build: aarch64-linux
os: ubuntu-latest
target: aarch64-unknown-linux-gnu
- build: x86_64-macos
os: macos-latest
target: x86_64-apple-darwin
- build: aarch64-macos
os: macos-latest
target: aarch64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Rust
uses: dtolnay/[email protected]
with:
targets: ${{ matrix.target }}
- name: Install dependencies
if: matrix.build == 'aarch64-linux'
run: |
sudo apt update
sudo apt install -y gcc-aarch64-linux-gnu
- name: Install protoc
uses: arduino/setup-protoc@v3
with:
version: "26.1"
- name: Get tag id
id: get-tag
uses: iawia002/get-tag-or-commit-id@v1
- name: Build release binary
run: cargo build --target ${{ matrix.target }} --release
# - name: Build archive
# shell: bash
# run: |
# bins=(wackerd wacker)
# for name in "${bins[@]}"; do
# file="$name-${{ steps.get-tag.outputs.id }}-${{ matrix.build }}.tar.gz"
# tar czf $file -C "target/${{ matrix.target }}/release" $name
# echo "$name=$file" >> $GITHUB_ENV
# done
# - name: Upload release archive
# uses: softprops/action-gh-release@v2
# with:
# files: |
# ${{ env.wackerd }}
# ${{ env.wacker }}
# publish:
# needs: build-release
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 1
# - name: Install Rust
# uses: dtolnay/[email protected]
# - name: Install protoc
# uses: arduino/setup-protoc@v3
# with:
# version: "26.1"
# - name: cargo publish
# run: |
# cargo publish -p wacker
# cargo publish -p wacker-daemon
# cargo publish -p wacker-cli
# env:
# CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}