Skip to content

Try build with cross #174

Try build with cross

Try build with cross #174

Workflow file for this run

#
# REF:
# 1. https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrixinclude
#
name: Test Creating Release Draft
on:
push:
branches:
- release/freebsd
tags:
- 'v*'
defaults:
run:
shell: bash
jobs:
standard:
name: Std
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-freebsd
extra: ['bin']
include:
- target: x86_64-unknown-freebsd
os: ubuntu-22.04
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Update Rust Toolchain Target
run: |
echo "targets = ['${{matrix.target}}']" >> rust-toolchain.toml
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1.9.0
# WARN: Keep the rustflags to prevent from the winget submission error: `CAQuietExec: Error 0xc0000135`
with:
cache: false
rustflags: ''
- name: Setup Nushell
uses: hustcer/setup-nu@v3
with:
version: 0.98.0
- name: Release Nu Binary
id: nu
run: |
apt-get install tree -y --no-install-recommends
cargo install cross
cross build --release --all --target x86_64-unknown-freebsd
# docker container run --rm \
# --volume ${{ github.workspace }}:/src \
# --user $(id --user):$(id --group) \
# hustcer/rust-cross-freebsd:latest build \
# --release --all --target x86_64-unknown-freebsd
tree target