Skip to content

Commit

Permalink
[CI] Add nightly tests & builds (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugsy authored Dec 15, 2023
1 parent b5134f6 commit 7f82f48
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
name: "Build Artifact"

on:
workflow_dispatch:
push:
pull_request:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name for release'
required: false
default: nightly

env:
CMAKE_FLAGS: "-DCFB_BUILD_TOOLS:BOOL=ON -DCFB_BUILD_TESTS:BOOL=ON -DCFB_BUILD_GUI:BOOL=ON"
CMAKE_TOOLCHAIN_FILE: "C:\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake"
TAG_NAME: ""

jobs:
build:
Expand All @@ -27,7 +33,13 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: true


- if: github.event_name == 'workflow_dispatch'
run: echo "TAG_NAME=${{ github.event.inputs.tag_name }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- if: github.event_name == 'schedule'
run: echo "TAG_NAME=nightly" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Prepare
shell: pwsh
run: |
Expand Down Expand Up @@ -60,8 +72,10 @@ jobs:
run: |
cmake --install ./build --config ${{ matrix.configuration }} --prefix ./artifact --verbose
- name: Publish
- name: Upload
uses: actions/upload-artifact@v3
with:
name: CFB_${{ matrix.platform }}_${{ matrix.configuration }}_${{ github.sha }}
path: artifact/
retention-days: 1

0 comments on commit 7f82f48

Please sign in to comment.