fix(ci): renamed .gitlab
to .forgejo
, corrected workflow name
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
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
This commit is contained in:
parent
2c12251b97
commit
5424e63bad
2 changed files with 101 additions and 215 deletions
|
@ -1,101 +1,101 @@
|
|||
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 }}
|
||||
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 }}
|
114
.gitlab-ci.yml
114
.gitlab-ci.yml
|
@ -1,114 +0,0 @@
|
|||
stages:
|
||||
- test
|
||||
- build
|
||||
- publish
|
||||
|
||||
variables:
|
||||
RUSTUP_TOOLCHAIN: stable
|
||||
|
||||
test:
|
||||
stage: test
|
||||
image: rust:latest
|
||||
script:
|
||||
- cargo test
|
||||
|
||||
build_linux:
|
||||
stage: build
|
||||
image: rust:latest
|
||||
|
||||
parallel:
|
||||
matrix:
|
||||
- TARGET: x86_64-unknown-linux-gnu
|
||||
BINARY_NAME: zenyx-x86_64-linux
|
||||
EXT: ""
|
||||
RUSTFLAGS: ""
|
||||
- TARGET: aarch64-unknown-linux-gnu
|
||||
BINARY_NAME: zenyx-aarch64-linux
|
||||
EXT: ""
|
||||
RUSTFLAGS: "-Clinker=aarch64-linux-gnu-gcc"
|
||||
- TARGET: powerpc64le-unknown-linux-gnu
|
||||
BINARY_NAME: zenyx-powerpc64le-linux
|
||||
EXT: ""
|
||||
RUSTFLAGS: "-Clinker=powerpc64le-linux-gnu-gcc"
|
||||
- TARGET: s390x-unknown-linux-gnu
|
||||
BINARY_NAME: zenyx-s390x-linux
|
||||
EXT: ""
|
||||
RUSTFLAGS: "-Clinker=s390x-linux-gnu-gcc"
|
||||
- TARGET: riscv64gc-unknown-linux-gnu
|
||||
BINARY_NAME: zenyx-riscv64-linux
|
||||
EXT: ""
|
||||
RUSTFLAGS: "-Clinker=riscv64-linux-gnu-gcc"
|
||||
|
||||
cache:
|
||||
key: "${CI_JOB_NAME}-${CI_COMMIT_SHA}"
|
||||
policy: pull-push
|
||||
paths:
|
||||
- "$HOME/.cargo/registry"
|
||||
- "$HOME/.cargo/git"
|
||||
- target
|
||||
|
||||
before_script:
|
||||
- apt-get update
|
||||
- |
|
||||
apt-get install -y \
|
||||
build-essential \
|
||||
gcc-aarch64-linux-gnu \
|
||||
gcc-powerpc64le-linux-gnu \
|
||||
gcc-s390x-linux-gnu \
|
||||
gcc-riscv64-linux-gnu \
|
||||
vulkan-tools \
|
||||
vulkan-validationlayers-dev \
|
||||
libvulkan-dev
|
||||
- rustup target add "$TARGET"
|
||||
|
||||
script:
|
||||
- cargo build --release --target "$TARGET"
|
||||
- mkdir -p artifacts
|
||||
- cp "target/$TARGET/release/zenyx$EXT" "artifacts/$BINARY_NAME"
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- artifacts/*
|
||||
expire_in: 1 week
|
||||
|
||||
build_windows_msvc:
|
||||
stage: build
|
||||
image: rust:latest
|
||||
|
||||
variables:
|
||||
TARGET: x86_64-pc-windows-msvc
|
||||
BINARY_NAME: zenyx-x86_64-windows-msvc.exe
|
||||
EXT: ".exe"
|
||||
|
||||
cache:
|
||||
key: "${CI_JOB_NAME}-${CI_COMMIT_SHA}"
|
||||
policy: pull-push
|
||||
paths:
|
||||
- "$HOME/.cargo/registry"
|
||||
- "$HOME/.cargo/git"
|
||||
- target
|
||||
- .cache/cargo-xwin
|
||||
|
||||
before_script:
|
||||
- apt-get update
|
||||
- apt-get install -y lld
|
||||
- rustup target add "$TARGET"
|
||||
- cargo install cargo-xwin --locked
|
||||
- cargo xwin build --release --target "$TARGET"
|
||||
|
||||
script:
|
||||
- mkdir -p artifacts
|
||||
- cp "target/$TARGET/release/zenyx$EXT" "artifacts/$BINARY_NAME"
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- artifacts/*
|
||||
expire_in: 1 week
|
||||
|
||||
publish:
|
||||
stage: publish
|
||||
script:
|
||||
- echo "Publishing artifacts..."
|
||||
dependencies:
|
||||
- build_linux
|
||||
- build_windows_msvc
|
Loading…
Add table
Add a link
Reference in a new issue