From 2723df02a3c17ff81d3609fdffd79a967550011a Mon Sep 17 00:00:00 2001 From: aliPMPAINT Date: Wed, 31 Mar 2021 10:32:03 +0430 Subject: [PATCH] Added x86_64 builds --- .github/workflows/cpp_linux_x86_64.yml | 77 ++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 .github/workflows/cpp_linux_x86_64.yml diff --git a/.github/workflows/cpp_linux_x86_64.yml b/.github/workflows/cpp_linux_x86_64.yml new file mode 100644 index 000000000..63a0e121c --- /dev/null +++ b/.github/workflows/cpp_linux_x86_64.yml @@ -0,0 +1,77 @@ +name: linux_x86_64 release + +on: [release] + +jobs: + deb-rpm-x86_64-build: + + runs-on: ubuntu-18.04 + container: axsauze/kompute-builder:0.2 + + steps: + - uses: actions/checkout@v2 + + # Storing the release version, needed to determine the name of the built packages + - name: Get version + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + + # For glslang, there are no packages on Ubuntu's(less than 20.04) official repository, so we use Debian's package + - name: installing dependencies + run: | + 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 update + apt-get install -t sid glslang-dev -y + apt-get install libfmt-dev -y + apt-get install libspdlog-dev -y + apt-get install libvulkan-dev -y + + - name: configure-cpp + run: | + cmake -Bbuild/ \ + -DCMAKE_BUILD_TYPE=Release \ + -DKOMPUTE_OPT_INSTALL=1 \ + -DKOMPUTE_OPT_ENABLE_SPDLOG=1 + + - name: build-cpp + run: | + cd build && make install DESTDIR=install + + - 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 ./build/install -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 ./build/install -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: ${{ env.DEB_NAME }} + 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: ${{ env.RPM_NAME }} + tag: ${{ github.ref }} + overwrite: true + body: "This is my release text"