Skip to content

Updating bshook to 5.1.9 and updating artifact build to v3 #29

Updating bshook to 5.1.9 and updating artifact build to v3

Updating bshook to 5.1.9 and updating artifact build to v3 #29

Workflow file for this run

---
name: NDK build
on:
workflow_dispatch: null
push:
tags:
- v*
branches:
- master
- dev/*
- feat/*
- fix/*
paths-ignore:
- "**.yml"
- "!.github/workflows/build-ndk.yml"
- "**.json"
- "!qpm.json"
- "!mod.template.json"
- "**.txt"
- "!CMakeLists.txt"
- "**.ps1"
- "**.md"
- .gitignore
pull_request:
branches: master
env:
module_id: particletuner
qmod_name: ParticleTuner
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout
with:
submodules: true
lfs: true
- uses: seanmiddleditch/gha-setup-ninja@v3
- name: Setup canary NDK
id: setup-ndk
uses: ./.github/actions/canary-ndk
- name: Create ndkpath.txt
run: >
echo ${{ steps.setup-ndk.outputs.ndk-path }} >
${GITHUB_WORKSPACE}/ndkpath.txt
cat ${GITHUB_WORKSPACE}/ndkpath.txt
- name: Extract version
if: startsWith(github.ref, 'refs/tags/v')
id: version
run: |
echo "TAG=${GITHUB_REF#refs/tags/}" >> ${GITHUB_OUTPUT}
echo "VERSION=${GITHUB_REF#refs/tags/v}" >> ${GITHUB_OUTPUT}
- name: Setup qpm
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: Fernthedev/qpm-action@v1
with:
workflow_token: ${{ secrets.GITHUB_TOKEN }}
restore: true
cache: true
publish: false
- name: Setup qpm for release
if: startsWith(github.ref, 'refs/tags/v')
uses: Fernthedev/qpm-action@v1
with:
workflow_token: ${{ secrets.GITHUB_TOKEN }}
restore: true
cache: true
publish: false
version: ${{ steps.version.outputs.VERSION }}
tag: ${{ steps.version.outputs.TAG }}
qpm_release_bin: true
qpm_debug_bin: true
qpm_qmod: ${{ env.qmod_name }}.qmod
- name: Build & Create Qmod
run: |
cd ${GITHUB_WORKSPACE}
qpm qmod zip
- name: Get Library Name
id: libname
run: |
cd ./build/
pattern="lib${module_id}*.so"
files=( $pattern )
echo "NAME=${files[0]}" >> ${GITHUB_OUTPUT}
- name: Rename debug artifact
run: mv "./build/debug/${{ steps.libname.outputs.NAME }}" "./build/debug_${{
steps.libname.outputs.NAME }}"
- name: Upload non-debug artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.libname.outputs.NAME }}
path: ./build/${{ steps.libname.outputs.NAME }}
if-no-files-found: error
- name: Upload debug artifact
uses: actions/upload-artifact@v3
with:
name: debug_${{ steps.libname.outputs.NAME }}
path: ./build/debug_${{ steps.libname.outputs.NAME }}
if-no-files-found: error
- name: Upload qmod artifact
uses: actions/upload-artifact@v3
with:
name: ${{env.qmod_name}}.qmod
path: ./${{ env.qmod_name }}.qmod
if-no-files-found: error
- name: Upload release artifacts
if: startsWith(github.ref, 'refs/tags/v')
id: upload_file_release
uses: softprops/action-gh-release@v0.1.15
with:
tag_name: ${{ github.event.inputs.version }}
files: |
./build/${{ steps.libname.outputs.NAME }}
./build/debug_${{ steps.libname.outputs.NAME }}
./${{ env.qmod_name }}.qmod
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}