evaluation loop handling #2952
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
pull_request: | |
branches: [ master, develop ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
GIT_SUBMODULE_STRATEGY: recursive | |
permissions: | |
contents: write | |
jobs: | |
doxygen: | |
name: "Doxygen" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install python3 graphviz | |
wget https://www.doxygen.nl/files/doxygen-1.13.1.linux.bin.tar.gz | |
tar -xzvf doxygen-1.13.1.linux.bin.tar.gz | |
- name: Generate docs | |
run: | | |
export PATH=$PATH:doxygen-1.13.1/bin/ | |
python3 -m pip install -r doxygen/requirements.txt | |
python3 doxygen/docs.py | |
- name: Debug | |
run: tree -aI . | |
- name: Deploy | |
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
publish_dir: ./doxygen/out/html | |
destination_dir: ${{ github.ref_name }} | |
external_repository: aui-framework/aui-framework.github.io | |
publish_branch: main | |
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
build-android: | |
name: "Android" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- uses: actions/setup-java@v1 | |
with: { java-version: '11' } | |
- name: Install Linux dependencies | |
run: sudo apt-get update && sudo apt-get install pkg-config libglew-dev zlib1g-dev libssl-dev libcrypt-dev libcurl4-openssl-dev libgtk-3-dev libfontconfig-dev ninja-build libpulse-dev | |
- name: Configure CMake | |
run: cmake -GNinja -B ${{github.workspace}}/build -DAUI_BUILD_FOR=android -DAUI_BUILD_EXAMPLES=TRUE | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build -t apps | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{github.workspace}}/build/app_project/app/build/outputs/apk/release/app-release-unsigned.apk | |
name: aui.example.views-release-unsigned.apk | |
build-ios-debug: | |
name: "iOS Debug" | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Install macos dependencies | |
run: brew install ninja | |
- name: Configure CMake | |
run: cmake -GNinja -B ${{github.workspace}}/build -DAUI_BUILD_FOR=ios -DAUI_BUILD_EXAMPLES=TRUE -DAUI_IOS_CODE_SIGNING_REQUIRED=FALSE | |
- name: Build app | |
run: cmake --build ${{github.workspace}}/build -t apps | |
- name: Pack app | |
working-directory: ${{github.workspace}}/build/app_project/bin/Debug | |
run: tar -cvf app.tar.gz aui.example.views.app | |
- name: Upload app | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{github.workspace}}/build/app_project/bin/Debug/*.tar.gz | |
name: aui.example.views-debug-unsigned.app.tar.gz | |
build-desktop: | |
name: ${{ matrix.os }} ${{ matrix.shared_or_static }} ${{ matrix.debug_or_release }} ${{ matrix.arch }} ${{ matrix.compiler }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2019, ubuntu-latest] | |
debug_or_release: [Debug, Release] | |
shared_or_static: [shared, static] | |
arch: [x86_64] | |
compiler: ["default", "clang"] | |
exclude: | |
- os: windows-2019 | |
compiler: "clang" | |
include: | |
- os: windows-2019 | |
generator: "Visual Studio 16 2019" | |
additional_cmake_flags: '-A Win32' | |
debug_or_release: Debug | |
shared_or_static: shared | |
arch: x86 | |
- os: windows-2019 | |
generator: "Visual Studio 16 2019" | |
additional_cmake_flags: '-A x64' | |
- os: ubuntu-latest | |
generator: "Ninja" | |
additional_cmake_flags: '' | |
- os: macos-latest | |
generator: "Ninja" | |
debug_or_release: Release | |
shared_or_static: static | |
additional_cmake_flags: '' | |
- os: ubuntu-latest | |
generator: "Ninja" | |
additional_cmake_flags: '' | |
debug_or_release: RelWithDebInfo | |
shared_or_static: static | |
- os: windows-2019 | |
generator: "Visual Studio 16 2019" | |
additional_cmake_flags: '-A x64' | |
debug_or_release: RelWithDebInfo | |
shared_or_static: static | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
# Cache AUI boot directory/build | |
# [cache example] | |
- name: Cache AUI.BOOT deps | |
id: cache-aui-boot | |
uses: actions/cache@v3 | |
env: | |
cache-name: aui-boot-${{ matrix.shared_or_static }}-${{ matrix.debug_or_release }}-${{ matrix.arch }} | |
with: | |
path: | | |
~/.aui | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
# [cache example] | |
- name: Install Linux dependencies | |
if: runner.os == 'Linux' | |
run: sudo apt-get update && sudo apt-get install pkg-config libglew-dev zlib1g-dev libssl-dev libcrypt-dev libcurl4-openssl-dev libgtk-3-dev libfontconfig-dev ninja-build libpulse-dev | |
- name: Install macos dependencies | |
if: runner.os == 'macOS' | |
run: brew install ninja | |
- name: Setup clang | |
if: matrix.compiler == 'clang' | |
run: | | |
echo "CC=/usr/bin/clang " >> $GITHUB_ENV | |
echo "CXX=/usr/bin/clang++ " >> $GITHUB_ENV | |
- name: Configure CMake | |
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: cmake -G "${{ matrix.generator }}" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.debug_or_release}} -DBUILD_SHARED_LIBS=${{ matrix.shared_or_static == 'shared' && 'ON' || 'OFF' }} ${{matrix.additional_cmake_flags}} -DAUI_IGNORE_OPENSSL=TRUE -DAUIB_PRODUCED_PACKAGES_SELF_SUFFICIENT=ON -DAUI_BUILD_AUDIO=OFF | |
- name: Build project | |
# Build your program with the given configuration | |
run: cmake --build ${{github.workspace}}/build --config ${{matrix.debug_or_release}} | |
- name: Build AUI tests | |
# Build your program with the given configuration | |
run: cmake --build ${{github.workspace}}/build --config ${{matrix.debug_or_release}} --target Tests | |
- name: Run AUI tests | |
if: runner.os == 'Windows' | |
working-directory: ${{github.workspace}}/build/bin/${{ matrix.debug_or_release }} | |
run: ${{github.workspace}}/build/bin/${{ matrix.debug_or_release }}/Tests.exe | |
- name: Run AUI tests | |
if: runner.os == 'Linux' | |
working-directory: ${{github.workspace}}/build/bin | |
run: ${{github.workspace}}/build/bin/Tests | |
# [cpack] | |
- name: Pack | |
working-directory: ${{github.workspace}}/build | |
run: cpack . -C ${{ matrix.debug_or_release }} | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{github.workspace}}/build/*.tar.gz | |
name: aui ${{ runner.os }} ${{ matrix.shared_or_static }} ${{ matrix.debug_or_release }} ${{ matrix.arch }} ${{ matrix.compiler }} | |
# [cpack] | |
# as a deployment test, let's build a small AUI-based app | |
deployment-tests-build-minimal-app: | |
name: Build test app ${{ matrix.os }} ${{ matrix.shared_or_static }} ${{ matrix.debug_or_release }} ${{ matrix.arch }} | |
runs-on: ${{ matrix.os }} | |
needs: [build-desktop] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2019, ubuntu-latest] | |
debug_or_release: [Debug, Release] | |
shared_or_static: [shared, static] | |
arch: [x86_64] | |
include: | |
- os: windows-2019 | |
generator: "Visual Studio 16 2019" | |
additional_cmake_flags: '-A x64' | |
- os: ubuntu-latest | |
generator: "Ninja" | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Install Linux dependencies | |
if: runner.os == 'Linux' | |
run: sudo apt-get update && sudo apt-get install pkg-config libglew-dev zlib1g-dev libssl-dev libcrypt-dev libcurl4-openssl-dev libgtk-3-dev libfontconfig-dev ninja-build libpulse-dev | |
- name: Install macos dependencies | |
if: runner.os == 'macOS' | |
run: brew install ninja | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
path: ${{github.workspace}}/artifacts | |
merge-multiple: 'true' | |
name: aui ${{ runner.os }} ${{ matrix.shared_or_static }} ${{ matrix.debug_or_release }} ${{ matrix.arch }} default | |
- name: Configure test app | |
run: | | |
cmake -G "${{ matrix.generator }}" -B ${{github.workspace}}/build -S ${{github.workspace}}/test/minimal_deployment_test -DCMAKE_BUILD_TYPE=${{matrix.debug_or_release}} -DBUILD_SHARED_LIBS=${{ matrix.shared_or_static == 'shared' && 'ON' || 'OFF' }} -DAUI_IGNORE_OPENSSL=TRUE -DARTIFACTS_DIR=${{github.workspace}}/artifacts -DAUI_APP_PACKAGING=AUI_PORTABLE_ZIP | |
- name: Build test app | |
working-directory: ${{github.workspace}}/build | |
run: cmake --build . --config ${{matrix.debug_or_release}} | |
- name: Print test app runtime dependencies (Windows) | |
working-directory: ${{github.workspace}}/build/bin | |
shell: bash | |
if: runner.os == 'Windows' | |
run: | | |
ldd $(find . -name "test_project.exe") | |
- name: Print test app runtime dependencies (Linux) | |
working-directory: ${{github.workspace}}/build/bin | |
shell: bash | |
if: runner.os != 'Windows' | |
run: | | |
ldd $(find . -name "test_project*") | |
- name: Run test app | |
working-directory: ${{github.workspace}}/build/bin | |
shell: bash | |
run: | | |
./$(find . -name "test_project*") | |
# let's run it on another machine as well | |
- name: Package test app (portables) | |
working-directory: ${{github.workspace}}/build | |
run: cpack -C ${{ matrix.debug_or_release }} . -B artifacts | |
- name: Package test app (innosetup) | |
if: runner.os == 'Windows' | |
working-directory: ${{github.workspace}}/build | |
run: | | |
cmake . -DAUI_APP_PACKAGING=INNOSETUP | |
cpack -C ${{ matrix.debug_or_release }} . -B artifacts | |
- name: Upload test app | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{github.workspace}}/build/artifacts/*.* | |
name: Test app ${{ runner.os }} ${{ matrix.shared_or_static }} ${{ matrix.debug_or_release }} | |
# run a small AUI-based test app on various platforms | |
deployment-tests-run-minimal-app: | |
name: Run test app ${{ matrix.os }} ${{ matrix.shared_or_static }} ${{ matrix.debug_or_release }} | |
runs-on: ${{ matrix.os }} | |
needs: [deployment-tests-build-minimal-app] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest, windows-2019] | |
debug_or_release: [Debug, Release] | |
shared_or_static: [shared, static] | |
steps: | |
- name: Install Linux dependencies | |
if: runner.os == 'Linux' | |
run: sudo apt-get update && sudo apt-get install libglew-dev | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
path: ${{github.workspace}}/artifacts | |
merge-multiple: 'true' | |
name: Test app ${{ runner.os }} ${{ matrix.shared_or_static }} ${{ matrix.debug_or_release }} | |
- name: Unpack test app | |
shell: bash | |
working-directory: ${{github.workspace}}/artifacts | |
run: unzip *portable* | |
- name: Print test app runtime dependencies | |
working-directory: ${{github.workspace}}/artifacts | |
shell: bash | |
run: | | |
cd *-portable | |
ldd $(find . -name "test_project*") | |
- name: Execute test_project (Windows) | |
if: runner.os == 'Windows' | |
shell: bash | |
working-directory: ${{github.workspace}}/artifacts | |
run: | | |
cd *-portable | |
./test_project.exe | |
- name: Execute test_project (Linux) | |
if: runner.os == 'Linux' | |
shell: bash | |
working-directory: ${{github.workspace}}/artifacts | |
run: | | |
cd *-portable | |
cd bin | |
./test_project | |
# validate the contents of minimal app packages | |
deployment-tests-validate-minimal-app: | |
name: Validate contents test app ${{ matrix.os }} ${{ matrix.shared_or_static }} ${{ matrix.debug_or_release }} | |
runs-on: ${{ matrix.os }} | |
needs: [deployment-tests-build-minimal-app] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest] | |
debug_or_release: [Debug, Release] | |
shared_or_static: [shared, static] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
path: ${{github.workspace}}/artifacts | |
merge-multiple: 'true' | |
name: Test app ${{ runner.os }} ${{ matrix.shared_or_static }} ${{ matrix.debug_or_release }} | |
- name: Unpack test app | |
shell: bash | |
working-directory: ${{github.workspace}}/artifacts | |
run: unzip *portable* | |
- name: Validate portable package contents (Windows) | |
if: runner.os == 'Windows' | |
shell: bash | |
working-directory: ${{github.workspace}}/artifacts | |
run: | | |
cd *portable*/ | |
../../.github/validate_app_contents_windows.sh | |
- name: Install INNOSETUP package | |
if: runner.os == 'Windows' | |
working-directory: ${{github.workspace}}/artifacts | |
run: | | |
Start-Process -FilePath .\test_project-2.2.8-windows-amd64-setup.exe -ArgumentList "/VERYSILENT" -Wait | |
- name: Validate portable package contents (Linux) | |
if: runner.os == 'Linux' | |
shell: bash | |
working-directory: ${{github.workspace}}/artifacts | |
run: | | |
cd *portable*/ | |
tree | |
${{github.workspace}}/.github/validate_app_contents_linux.sh | |
release: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
needs: [deployment-tests-run-minimal-app, deployment-tests-validate-minimal-app] | |
if: github.event_name != 'pull_request' | |
name: "Create release draft" | |
steps: | |
- name: Checkout | |
if: ${{ !contains(github.ref, 'tags/v') }} | |
uses: actions/checkout@v4 | |
# Remove old release drafts | |
- name: Remove Old Release Drafts | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh api repos/{owner}/{repo}/releases \ | |
--jq '.[] | select(.draft == true) | .id' \ | |
| xargs -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{} | |
- name: Retrieve version | |
if: ${{ contains(github.ref, 'tags/v') }} | |
run: | | |
echo "TAG_NAME=${{ github.ref }} " >> $GITHUB_ENV | |
echo "RELEASE_NAME=${{ github.ref }} " >> $GITHUB_ENV | |
- name: Increment version | |
if: ${{ !contains(github.ref, 'tags/v') }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
python3 .github/generate-next-version.py $(gh release list -L 1 --json name --jq '.[] .name') | |
- name: Output version | |
id: version | |
run: | | |
echo "ref=$TAG_NAME" >> $GITHUB_OUTPUT | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
merge-multiple: 'true' | |
pattern: aui* | |
- name: Publish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release create "${{ env.TAG_NAME }}" \ | |
--latest=false \ | |
--draft \ | |
--prerelease \ | |
--generate-notes \ | |
--title "${{ env.TAG_NAME }}" \ | |
--target $GITHUB_SHA \ | |
artifacts/*.* | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
ref: ${{ steps.version.outputs.ref }} |