ci: unify build workflow
This commit is contained in:
parent
50aa582fa8
commit
d60ff76fb2
44
.github/workflows/build-linux-arm64.yml
vendored
44
.github/workflows/build-linux-arm64.yml
vendored
|
@ -1,44 +0,0 @@
|
|||
name: build librashader-capi for ARM64 Linux
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
schedule:
|
||||
- cron: "0 0 * * 6"
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
profile: ['debug', 'release', 'optimized']
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Install nightly Rust
|
||||
uses: actions-rs/toolchain@v1.0.6
|
||||
with:
|
||||
toolchain: nightly
|
||||
override: true
|
||||
target: aarch64-unknown-linux-gnu
|
||||
- name: Install ARM64 cross-compilation dependencies
|
||||
continue-on-error: true
|
||||
run: |
|
||||
sudo apt-get update || true
|
||||
sudo dpkg --add-architecture arm64
|
||||
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted" | sudo tee -a /etc/apt/sources.list
|
||||
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted" | sudo tee -a /etc/apt/sources.list
|
||||
sudo apt-get update || true
|
||||
sudo apt-get -y install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
|
||||
- name: Build dynamic library
|
||||
run: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=/usr/bin/aarch64-linux-gnu-gcc cargo run -p librashader-build-script -- --profile ${{ matrix.profile }} --target aarch64-unknown-linux-gnu
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: ${{ format('build-outputs-aarch64-unknown-linux-gnu-{0}', matrix.profile) }}
|
||||
path: ${{ format('target/aarch64-unknown-linux-gnu/{0}/librashader.*', matrix.profile) }}
|
48
.github/workflows/build.yml
vendored
48
.github/workflows/build.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: build librashader-capi for x86_64 and aarch64-apple-darwin
|
||||
name: build librashader-capi
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -14,10 +14,20 @@ jobs:
|
|||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest, macos-14]
|
||||
profile: ['debug', 'release', 'optimized']
|
||||
os: ['windows-latest', 'ubuntu-latest', 'macos-latest', 'macos-14']
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
output: x86_64-ubuntu
|
||||
- os: windows-latest
|
||||
output: x86_64-windows
|
||||
- os: macos-latest
|
||||
output: x86_64-macos
|
||||
- os: macos-14
|
||||
output: aarch64-macos
|
||||
fail-fast: false
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: ${{ matrix.output }} (${{ matrix.profile }})
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
@ -31,5 +41,37 @@ jobs:
|
|||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: ${{ format('build-outputs-{0}-{1}', matrix.os, matrix.profile) }}
|
||||
name: ${{ format('librashader-{0}-{1}-{2}', matrix.output, github.sha, matrix.profile) }}
|
||||
path: ${{ format('target/{0}/librashader.*', matrix.profile) }}
|
||||
build-ubuntu-arm64:
|
||||
strategy:
|
||||
matrix:
|
||||
profile: ['debug', 'release', 'optimized']
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-latest
|
||||
name: aarch64-ubuntu
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Install nightly Rust
|
||||
uses: actions-rs/toolchain@v1.0.6
|
||||
with:
|
||||
toolchain: nightly
|
||||
override: true
|
||||
target: aarch64-unknown-linux-gnu
|
||||
- name: Install ARM64 cross-compilation dependencies
|
||||
continue-on-error: true
|
||||
run: |
|
||||
sudo apt-get update || true
|
||||
sudo dpkg --add-architecture arm64
|
||||
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted" | sudo tee -a /etc/apt/sources.list
|
||||
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted" | sudo tee -a /etc/apt/sources.list
|
||||
sudo apt-get update || true
|
||||
sudo apt-get -y install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
|
||||
- name: Build dynamic library
|
||||
run: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=/usr/bin/aarch64-linux-gnu-gcc cargo run -p librashader-build-script -- --profile ${{ matrix.profile }} --target aarch64-unknown-linux-gnu
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: ${{ format('librashader-aarch64-ubuntu-{0}-{1}', github.sha, matrix.profile) }}
|
||||
path: ${{ format('target/aarch64-unknown-linux-gnu/{0}/librashader.*', matrix.profile) }}
|
||||
|
|
7
.github/workflows/package-obs.yml
vendored
7
.github/workflows/package-obs.yml
vendored
|
@ -7,7 +7,8 @@ env:
|
|||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
approve-obs-build: # First step
|
||||
approve-obs-build:
|
||||
name: "approval"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Approve
|
||||
|
@ -21,15 +22,19 @@ jobs:
|
|||
- repo: Fedora_39
|
||||
spec: librashader.spec
|
||||
can_fail: true
|
||||
name: Fedora 39 (.rpm)
|
||||
- repo: xUbuntu_23.10
|
||||
spec: librashader.spec
|
||||
can_fail: true
|
||||
name: Ubuntu 23.10 (.deb)
|
||||
- repo: Arch
|
||||
spec: PKGBUILD
|
||||
can_fail: false
|
||||
name: Arch (PKGBUILD)
|
||||
runs-on: ubuntu-latest
|
||||
needs: [approve-obs-build]
|
||||
continue-on-error: ${{ matrix.can_fail }}
|
||||
name: ${{ matrix.name }}
|
||||
container:
|
||||
image: fedora:39
|
||||
options: --privileged
|
||||
|
|
Loading…
Reference in a new issue