Skip to content

Commit

Permalink
ci: build cli
Browse files Browse the repository at this point in the history
  • Loading branch information
chyyran committed Sep 27, 2024
1 parent da53c3d commit 629070e
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,20 @@ jobs:
with:
name: ${{ format('librashader-{0}-{1}-{2}', matrix.output, github.sha, matrix.profile) }}
path: ${{ format('target/{0}/librashader.*', matrix.profile) }}
- name: Install Ubuntu librashader CLI build dependencies
if: matrix.profile == 'release' && matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update || true
sudo apt-get -y install xorg-dev
- name: Build librashader CLI
if: matrix.profile == 'release'
run: cargo build -p librashader-cli --release
- name: Upload librashader-cli
uses: actions/upload-artifact@v3.1.2
if: matrix.profile == 'release'
with:
name: ${{ format('librashader-cli-{0}-{1}', matrix.output, github.sha) }}
path: ${{ format('target/{0}/librashader-cli*', matrix.profile) }}
build-ubuntu-arm64:
strategy:
matrix:
Expand All @@ -65,14 +79,23 @@ jobs:
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
sudo apt-get -y install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu xorg-dev libx11-dev:arm64 libxrandr-dev:arm64
- 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) }}
- name: Build librashader CLI
if: matrix.profile == 'release'
run: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=/usr/bin/aarch64-linux-gnu-gcc cargo build -p librashader-cli --release --target aarch64-unknown-linux-gnu
- name: Upload librashader-cli
uses: actions/upload-artifact@v3.1.2
if: matrix.profile == 'release'
with:
name: ${{ format('librashader-cli-aarch64-ubuntu-{0}', github.sha) }}
path: ${{ format('target/aarch64-unknown-linux-gnu/{0}/librashader-cli', matrix.profile) }}
build-windows-arm64:
strategy:
matrix:
Expand All @@ -95,6 +118,15 @@ jobs:
with:
name: ${{ format('librashader-aarch64-windows-{0}-{1}', github.sha, matrix.profile) }}
path: ${{ format('target/aarch64-pc-windows-msvc/{0}/librashader.*', matrix.profile) }}
- name: Build librashader CLI
if: matrix.profile == 'release'
run: cargo build -p librashader-cli --release --target aarch64-pc-windows-msvc
- name: Upload librashader-cli
uses: actions/upload-artifact@v3.1.2
if: matrix.profile == 'release'
with:
name: ${{ format('librashader-cli-aarch64-pc-windows-msvc-{0}', github.sha) }}
path: ${{ format('target/aarch64-pc-windows-msvc/{0}/librashader-cli.exe', matrix.profile) }}
build-windows-7:
strategy:
matrix:
Expand All @@ -117,3 +149,12 @@ jobs:
with:
name: ${{ format('librashader-x86_64-win7-windows-{0}-{1}', github.sha, matrix.profile) }}
path: ${{ format('target/x86_64-win7-windows-msvc/{0}/librashader.*', matrix.profile) }}
- name: Build librashader CLI
if: matrix.profile == 'release'
run: cargo build -p librashader-cli --release --target aarch64-pc-windows-msvc -Zbuild-std
- name: Upload librashader-cli
uses: actions/upload-artifact@v3.1.2
if: matrix.profile == 'release'
with:
name: ${{ format('librashader-cli-x86_64-win7-windows-msvc-{0}', github.sha) }}
path: ${{ format('target/x86_64-win7-windows-msvc/{0}/librashader-cli.exe', matrix.profile) }}

0 comments on commit 629070e

Please sign in to comment.