Skip to content

Update cross-compile.yml #129

Update cross-compile.yml

Update cross-compile.yml #129

Workflow file for this run

name: Cross compile
on:
push:
branches: [main]
paths-ignore:
- "docker-compose.yaml"
jobs:
compile:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
docker: linux/amd64
cross: false
binary: naive
- target: aarch64-unknown-linux-gnu
docker: linux/arm64
cross: true
binary: naive
steps:
- uses: actions/checkout@v2
- name: Setup cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.target }}-cargo-
- name: install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- name: compile
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.cross }}
command: build
args: --release --target=${{ matrix.target }}
- name: move target
run: |
mkdir -p action-release/${{ matrix.docker }}/
mv target/${{ matrix.target }}/release/${{ matrix.binary }} action-release/${{ matrix.docker }}/
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ replace(matrix.docker, '/', '-') }}-artifact

Check failure on line 53 in .github/workflows/cross-compile.yml

View workflow run for this annotation

GitHub Actions / Cross compile

Invalid workflow file

The workflow is not valid. .github/workflows/cross-compile.yml (Line: 53, Col: 17): Unrecognized function: 'replace'. Located at position 1 within expression: replace(matrix.docker, '/', '-')
path: action-release/