Build #265
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
# SPDX-FileCopyrightText: © Vegard IT GmbH (https://vegardit.com) and contributors | |
# SPDX-FileContributor: Sebastian Thomschke, Vegard IT GmbH | |
# SPDX-License-Identifier: Apache-2.0 | |
# | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions | |
name: Build | |
on: | |
schedule: | |
- cron: '0 15 1 * *' | |
push: | |
branches-ignore: # build all branches except: | |
- 'dependabot/**' # prevent GHA triggered twice (once for commit to the branch and once for opening/syncing the PR) | |
tags-ignore: # don't build tags | |
- '**' | |
paths-ignore: | |
- '**/*.adoc' | |
- '**/*.md' | |
- '.editorconfig' | |
- '.git*' | |
- '.github/*.yml' | |
- '.github/workflows/stale.yml' | |
- 'tools' | |
pull_request: | |
paths-ignore: | |
- '**/*.adoc' | |
- '**/*.md' | |
- '.editorconfig' | |
- '.git*' | |
- '.github/*.yml' | |
- 'tools' | |
workflow_dispatch: | |
# https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/ | |
inputs: | |
debug-with-ssh: | |
description: "Start an SSH session for debugging purposes at the end of the build:" | |
default: never | |
type: choice | |
options: [ always, on_failure, on_failure_or_cancelled, never ] | |
debug-with-ssh-only-for-actor: | |
description: "Limit access to the SSH session to the GitHub user that triggered the job." | |
default: true | |
type: boolean | |
debug-with-ssh-only-jobs-matching: | |
description: "Only start an SSH session for jobs matching this regex pattern:" | |
default: ".*" | |
type: string | |
test-target: | |
description: "If specified only the given target will be tested" | |
default: "" | |
type: choice | |
options: [ "", cpp, cs, eval, flash, hl, java, jvm, lua, neko, node, php, python ] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
########################################################### | |
build: | |
########################################################### | |
# https://github.com/vegardit/haxe-reusable-workflows/ | |
uses: vegardit/haxe-reusable-workflows/.github/workflows/test-with-haxe.yml@dev | |
strategy: | |
fail-fast: false | |
matrix: | |
os: # https://github.com/actions/runner-images#available-images | |
- ubuntu-latest | |
- macos-13 # Intel | |
- windows-latest | |
haxe: | |
- nightly | |
- latest | |
- 4.3.6 | |
- 4.2.5 | |
include: | |
- os: macos-latest # ARM | |
haxe: 4.3.6 | |
with: | |
haxe-reusable-workflows-version: dev | |
runner-os: ${{ matrix.os }} | |
haxe-version: ${{ matrix.haxe }} | |
haxe-libs: haxe-doctest hx3compat | |
debug-with-ssh: ${{ inputs.debug-with-ssh || 'never' }} | |
debug-with-ssh-only-for-actor: ${{ inputs.debug-with-ssh-only-for-actor || false }} | |
debug-with-ssh-only-jobs-matching: ${{ inputs.debug-with-ssh-only-jobs-matching }} | |
test-cpp: ${{ inputs.test-target == '' || inputs.test-target == 'cpp' }} | |
test-cs: ${{ (inputs.test-target == '' || inputs.test-target == 'cs') && matrix.haxe != 'nightly'}} # Haxe 5 drops C# Support | |
test-eval: ${{ inputs.test-target == '' || inputs.test-target == 'eval' }} | |
test-flash: | | |
enabled: ${{ (inputs.test-target == '' || inputs.test-target == 'flash') && !startsWith(matrix.os, 'macos') }} # FlashPlayer hangs on MacOS | |
allow-failure: true # workaround for random "Application crashed with an unhandled SIGSEGV" on Linux and timing issues on Windows | |
test-hl: | | |
enabled: ${{ inputs.test-target == '' || inputs.test-target == 'hl' }} | |
allow-failure: true # Segmentation faults https://github.com/HaxeFoundation/hashlink/issues/579 | |
test-java: ${{ (inputs.test-target == '' || inputs.test-target == 'java') && matrix.haxe != 'nightly' }} # Haxe 5 drops Java Support | |
test-jvm: ${{ inputs.test-target == '' || inputs.test-target == 'jvm' }} | |
test-lua: ${{ inputs.test-target == '' || inputs.test-target == 'lua' }} | |
test-neko: ${{ inputs.test-target == '' || inputs.test-target == 'neko' }} | |
test-node: ${{ inputs.test-target == '' || inputs.test-target == 'node' }} | |
test-php: ${{ inputs.test-target == '' || inputs.test-target == 'php' }} | |
test-python: ${{ inputs.test-target == '' || inputs.test-target == 'python' }} | |
allow-failure: ${{ matrix.haxe == 'nightly' }} | |
retries: 2 | |
before-tests: | | |
if [[ $OSTYPE == linux* ]] && ! hash ping &>/dev/null; then | |
sudo apt-get install iputils-ping | |
fi |