Some checks failed
Build Zenyx ⚡ / Build aarch64-unknown-linux-gnu (push) Has been cancelled
Build Zenyx ⚡ / Build powerpc64le-unknown-linux-gnu (push) Has been cancelled
Build Zenyx ⚡ / Build riscv64gc-unknown-linux-gnu (push) Has been cancelled
Build Zenyx ⚡ / Build s390x-unknown-linux-gnu (push) Has been cancelled
Build Zenyx ⚡ / Build x86_64-unknown-linux-gnu (push) Has been cancelled
Build Zenyx ⚡ / Build x86_64-pc-windows-gnu (push) Has been cancelled
Build Zenyx ⚡ / Build x86_64-pc-windows-msvc (push) Has been cancelled
101 lines
2.9 KiB
YAML
101 lines
2.9 KiB
YAML
name: Build Zenyx ⚡
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
name: Build ${{ matrix.target }}
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
docker:
|
|
image: docker:dind
|
|
options: >-
|
|
--privileged
|
|
--env DOCKER_TLS_CERTDIR=""
|
|
ports:
|
|
- 2375:2375
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target:
|
|
- x86_64-unknown-linux-gnu
|
|
- aarch64-unknown-linux-gnu
|
|
- powerpc64le-unknown-linux-gnu
|
|
- s390x-unknown-linux-gnu
|
|
- riscv64gc-unknown-linux-gnu
|
|
- x86_64-pc-windows-gnu
|
|
- x86_64-pc-windows-msvc
|
|
include:
|
|
- target: x86_64-unknown-linux-gnu
|
|
binary_name: zenyx-x86_64-linux
|
|
ext: ""
|
|
- target: aarch64-unknown-linux-gnu
|
|
binary_name: zenyx-aarch64-linux
|
|
ext: ""
|
|
- target: powerpc64le-unknown-linux-gnu
|
|
binary_name: zenyx-powerpc64le-linux
|
|
ext: ""
|
|
- target: s390x-unknown-linux-gnu
|
|
binary_name: zenyx-s390x-linux
|
|
ext: ""
|
|
- target: riscv64gc-unknown-linux-gnu
|
|
binary_name: zenyx-riscv64-linux
|
|
ext: ""
|
|
- target: x86_64-pc-windows-gnu
|
|
binary_name: zenyx-x86_64-windows-gnu.exe
|
|
ext: ".exe"
|
|
- target: x86_64-pc-windows-msvc
|
|
binary_name: zenyx-x86_64-windows-msvc.exe
|
|
ext: ".exe"
|
|
|
|
steps:
|
|
- name: 📥 Checkout source
|
|
uses: https://github.com/actions/checkout@v4
|
|
|
|
- name: 🐳 Set up Docker CLI
|
|
uses: https://github.com/docker/setup-docker-action@v3
|
|
with:
|
|
docker-binaries: true
|
|
|
|
- name: 🛠️ Install Rust toolchain
|
|
uses: https://github.com/actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
target: ${{ matrix.target }}
|
|
override: true
|
|
components: rust-src
|
|
|
|
- name: 🧩 Restore Cargo cache
|
|
uses: https://github.com/actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-${{ matrix.target }}-
|
|
|
|
- name: 🧰 Install Cross
|
|
run: cargo install cross --locked
|
|
|
|
- name: 🚀 Build with cross
|
|
env:
|
|
DOCKER_HOST: tcp://localhost:2375
|
|
CROSS_CONTAINER_IN_CONTAINER: true
|
|
run: cross build --target ${{ matrix.target }} --release
|
|
|
|
- name: 📦 Package artifact
|
|
run: |
|
|
mkdir -p artifacts
|
|
cp target/${{ matrix.target }}/release/zenyx${{ matrix.ext }} artifacts/${{ matrix.binary_name }}
|
|
|
|
- name: ⬆️ Upload artifact
|
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.binary_name }}
|
|
path: artifacts/${{ matrix.binary_name }}
|