mirror of
https://github.com/aljazceru/goose.git
synced 2026-01-03 14:34:26 +01:00
chore: use hermit to install node, rust and protoc (#2766)
This commit is contained in:
22
.github/workflows/build-cli.yml
vendored
22
.github/workflows/build-cli.yml
vendored
@@ -20,6 +20,10 @@ on:
|
||||
type: string
|
||||
required: false
|
||||
default: '["x86_64","aarch64"]'
|
||||
ref:
|
||||
type: string
|
||||
required: false
|
||||
default: 'refs/heads/main'
|
||||
|
||||
name: "Reusable workflow to build CLI"
|
||||
|
||||
@@ -41,6 +45,9 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Update version in Cargo.toml
|
||||
if: ${{ inputs.version != '' }}
|
||||
@@ -48,14 +55,8 @@ jobs:
|
||||
sed -i.bak 's/^version = ".*"/version = "'${{ inputs.version }}'"/' Cargo.toml
|
||||
rm -f Cargo.toml.bak
|
||||
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@38b70195107dddab2c7bbd522bcf763bac00963b # pin@stable
|
||||
with:
|
||||
toolchain: stable
|
||||
target: ${{ matrix.architecture }}-${{ matrix.target-suffix }}
|
||||
|
||||
- name: Install cross
|
||||
run: cargo install cross --git https://github.com/cross-rs/cross
|
||||
run: source ./bin/activate-hermit && cargo install cross --git https://github.com/cross-rs/cross
|
||||
|
||||
- name: Build CLI
|
||||
env:
|
||||
@@ -64,12 +65,7 @@ jobs:
|
||||
RUST_BACKTRACE: 1
|
||||
CROSS_VERBOSE: 1
|
||||
run: |
|
||||
# Install protoc if on macOS
|
||||
if [ "${{ matrix.os }}" = "macos-latest" ]; then
|
||||
brew install protobuf
|
||||
export PROTOC=$(which protoc)
|
||||
fi
|
||||
|
||||
source ./bin/activate-hermit
|
||||
export TARGET="${{ matrix.architecture }}-${{ matrix.target-suffix }}"
|
||||
rustup target add "${TARGET}"
|
||||
echo "Building for target: ${TARGET}"
|
||||
|
||||
Reference in New Issue
Block a user