llama-cpp-turboquant/.github/workflows/cpp_linux_other_archs.yml
2021-03-31 10:32:57 +04:30

112 lines
4.4 KiB
YAML

name: linux_other_archs release
on: [release]
jobs:
build_job:
runs-on: ubuntu-18.04
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}
# The used architectures
strategy:
matrix:
include:
- arch: aarch64
distro: ubuntu18.04
- arch: armv7
distro: ubuntu18.04
steps:
- uses: actions/checkout@v2
# Storing the release version, needed to determine the name of the built packages
# Storing the installation directory, needed to determine where the packages was compiled
- name: Get version and installation directory
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- uses: uraimo/run-on-arch-action@v2.0.9
name: build vulkan-kompute on ${{ matrix.arch }} architecture
id: build
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
githubToken: ${{ github.token }}
setup: |
mkdir -p "${PWD}/archs"
dockerRunArgs: |
--volume "${PWD}/archs:/archs"
env: |
artifact_name: ${{ matrix.distro }}_${{ matrix.arch }}
shell: /bin/sh
install: |
apt-get update -q -y
apt-get install -q -y gnupg
echo "deb http://deb.debian.org/debian sid main" | tee /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC
apt-get update -q -y
apt-get install -t sid glslang-dev -y
apt-get install -q -y cmake
apt-get install -q -y g++
apt-get install -q -y python3
apt-get install -q -y libfmt-dev -y
apt-get install -q -y libspdlog-dev -y
apt-get install -q -y libvulkan-dev -y
run: |
cmake -S /home/runner/work/vulkan-kompute/vulkan-kompute -Bbuild/ \
-DCMAKE_BUILD_TYPE=Release \
-DKOMPUTE_OPT_INSTALL=1 \
-DKOMPUTE_OPT_ENABLE_SPDLOG=1
cd build && make install DESTDIR=/archs/${artifact_name}
- name: Moving the compiled packages to the current directory
run: |
sudo mv "${PWD}/archs/${{ matrix.distro }}_${{ matrix.arch }}" .
- name: build-deb
uses: bpicode/github-action-fpm@master
with:
fpm_args: 'usr/local/include usr/local/lib'
fpm_opts: '--debug -n kompute -v ${{ env.RELEASE_VERSION }} -t deb -s dir -C ./${{ matrix.distro }}_${{ matrix.arch }} -d "libvulkan-dev >= 1.1.0" -d "libfmt-dev > 0" -d "libspdlog-dev > 0" -d "glslang-dev >= 11.0.0"'
- name: Get the debian package name
run: DEB_NAME=$(ls *.deb) && echo "DEB_NAME=$DEB_NAME" >> $GITHUB_ENV
- name: build-rpm
uses: bpicode/github-action-fpm@master
with:
fpm_args: 'usr/local/include usr/local/lib'
fpm_opts: '--debug -n kompute -v ${{ env.RELEASE_VERSION }} -t rpm -s dir -C ./${{ matrix.distro }}_${{ matrix.arch }} -d "vulkan-headers >= 1.1.0" -d "fmt > 0" -d "spdlog > 0" -d "glslang >= 11.0.0"'
- name: Get the rpm package name
run: RPM_NAME=$(ls *.rpm) && echo "RPM_NAME=$RPM_NAME" >> $GITHUB_ENV
- name: Upload deb to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.DEB_NAME }}
asset_name: kompute_${{ env.RELEASE_VERSION }}_${{ matrix.arch }}.deb
tag: ${{ github.ref }}
overwrite: true
body: "This is my release text"
- name: Upload rpm to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.RPM_NAME }}
asset_name: kompute-${{ env.RELEASE_VERSION }}-${{ matrix.arch }}.rpm
tag: ${{ github.ref }}
overwrite: true
body: "This is my release text"