From 7d8b4b3398c7044b283682784f05af9eb3bcb8be Mon Sep 17 00:00:00 2001 From: Rain Date: Wed, 6 Mar 2024 02:32:56 -0800 Subject: chore(ci): add cross-compile job for illumos (#1830) I also tried getting FreeBSD to work, but didn't get too far sadly. I don't have the time to debug this so I just put in a comment for now. (With my changes, Atuin works great on FreeBSD as well.) --- .github/workflows/rust.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to '.github') diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 774e4a4d..e6e8573a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -44,6 +44,43 @@ jobs: - name: Run cargo build main run: cargo build --all --locked --release + cross-compile: + strategy: + matrix: + # There was an attempt to make cross-compiles also work on FreeBSD, but that failed with: + # + # warning: libelf.so.2, needed by <...>/libkvm.so, not found (try using -rpath or -rpath-link) + target: [x86_64-unknown-illumos] + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install cross + uses: taiki-e/install-action@v1 + with: + tool: cross + + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ matrix.target }}-cross-compile-${{ hashFiles('**/Cargo.lock') }} + + - name: Run cross build common + run: cross build -p atuin-common --locked --target ${{ matrix.target }} + + - name: Run cross build client + run: cross build -p atuin-client --locked --target ${{ matrix.target }} + + - name: Run cross build server + run: cross build -p atuin-server --locked --target ${{ matrix.target }} + + - name: Run cross build main + run: cross build --all --locked --target ${{ matrix.target }} + unit-test: strategy: matrix: -- cgit v1.3.1