add continous integration
This commit is contained in:
committed by
israpps
parent
676ac34ec3
commit
02a23cd415
@@ -0,0 +1,60 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'engine/**'
|
||||
- 'demo/**'
|
||||
- '**.cpp'
|
||||
- '.github/workflows/compile.yml'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
make_args:
|
||||
description: pass extra make argumments to Program compilation
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: h4570/tyra
|
||||
steps:
|
||||
- name: install deps
|
||||
run: |
|
||||
apt-get update
|
||||
apt install -y git make wget
|
||||
|
||||
- name: Workaround permission issue
|
||||
run: |
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Compile tyra
|
||||
run: |
|
||||
make clean all ${{ github.event.inputs.make_args }} -C engine
|
||||
|
||||
- name: Compile tyra demo
|
||||
run: |
|
||||
make clean all -C demo
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: |
|
||||
echo "SHA8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV
|
||||
|
||||
- name: Get branch
|
||||
if: github.ref != 'refs/heads/main'
|
||||
id: brnch
|
||||
run: |
|
||||
echo "BRANCH=$(echo -${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload artifacts
|
||||
if: ${{ success() }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: tyra-${{ env.SHA8 }}${{ env.BRANCH }}
|
||||
path: |
|
||||
engine/bin
|
||||
demo/bin
|
||||
Reference in New Issue
Block a user