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"