Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 22 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ jobs:
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
Expand All @@ -130,24 +130,26 @@ jobs:
with:
targets: ${{ matrix.target }}

- name: Install cross-compilation tools (Linux ARM)
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
- name: Install cross (Linux)
if: runner.os == 'Linux'
uses: taiki-e/install-action@cross

- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}

- name: Build
shell: bash
run: |
if [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
fi
cargo build --release --target ${{ matrix.target }}
- name: Build (Linux)
if: runner.os == 'Linux'
run: cross build --release --target ${{ matrix.target }}

- name: Build (macOS)
if: runner.os == 'macOS'
run: cargo build --release --target ${{ matrix.target }}

- name: Build (Windows)
if: runner.os == 'Windows'
run: cargo build --release --target ${{ matrix.target }}

- name: Prepare binary (Unix)
if: runner.os != 'Windows'
Expand All @@ -159,6 +161,12 @@ jobs:
run: |
cp target/${{ matrix.target }}/release/migrate.exe migrate-${{ matrix.target }}.exe

- name: Test binary compatibility (Linux)
if: runner.os == 'Linux' && matrix.target == 'x86_64-unknown-linux-musl'
run: |
# Verify the binary runs on an older system (Debian Bullseye has GLIBC 2.31)
docker run --rm -v $PWD:/app debian:bullseye /app/migrate-${{ matrix.target }} --version

- name: Upload to release
uses: softprops/action-gh-release@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "migrate"
version = "0.3.0"
version = "0.3.1"
edition = "2021"
description = "Generic file migration tool for applying ordered transformations to a project directory"
license = "MIT"
Expand Down