Skip to content

Commit

Permalink
Initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Mar 1, 2023
1 parent a8990ca commit 860ffbf
Show file tree
Hide file tree
Showing 48 changed files with 3,813 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 3

[*.{bat,cmd}]
end_of_line = crlf

[*.{yml,yaml}]
indent_size = 2
130 changes: 130 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# inspired by https://github.com/alexkaratarakis/gitattributes

# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto

#
# The above will handle all files with names NOT matching patterns defined below
#

# Git files
.gitattributes text eol=lf
**/.gitattributes text eol=lf
.gitignore text eol=lf
**/.gitignore text eol=lf


# Documents
*.doc binary diff=astextplain
*.docx binary diff=astextplain
*.dot binary diff=astextplain
*.pdf binary diff=astextplain
*.ppt binary diff=astextplain
*.pptx binary diff=astextplain
*.rtf binary diff=astextplain
*.vsd binary diff=astextplain
*.vsdx binary diff=astextplain
*.odt binary diff=odf
*.ods binary diff=odf
*.odp binary diff=odf
*.adoc text
*.csv text
*.md text diff=markdown
*.txt text


# Config/Serialisation
.editorconfig text
**/.editorconfig text
*.ini text
*.properties text
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text


# Scripts
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
*.bash text eol=lf
*.fish text eol=lf
*.sh text eol=lf
*.zsh text eol=lf
*.hx text
*.lua text
*.php text
*.python text
*.sql text


# Archives
*.7z binary
*.gz binary
*.tar binary
*.tar.gz binary
*.tgz binary
*.xz binary
*.zip binary


# Native binaries
*.dll binary
*.dylib binary
*.exe binary
*.so binary


# Images
*.eps binary
*.gif binary
*.ico binary
*.jpg binary
*.jpeg binary
*.png binary
*.svg text
*.svgz binary
*.tif binary
*.tiff binary


# Fonts
*.eot binary
*.otf binary
*.ttf binary
*.woff binary


# Java
*.gradle text diff=java
*.gradle.kts text diff=java
*.java text diff=java
*.class binary
*.ear binary
*.jceks binary
*.jks binary
*.jar binary
*.pak binary
*.war binary
*.jsp text
*.jspf text
*.jspx text
*.tld text
*.tag text
*.tagx text


# Web
*.css text diff=css
*.htm text diff=html
*.html text diff=html
*.js text


# https://git-scm.com/docs/gitattributes#_export_ignore
.gitattributes export-ignore
.gitignore export-ignore
.gitkeep export-ignore
6 changes: 6 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*Issue #, if available:*

*Description of changes:*


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
day: monday
time: "09:00"
commit-message:
prefix: fix
prefix-development: chore
include: scope
labels:
- gha
- dependencies
26 changes: 26 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an issue becomes stale
daysUntilStale: 120

# Number of days of inactivity before a stale issue is closed
daysUntilClose: 14

# Issues with these labels will never be considered stale
exemptLabels:
- enhancement
- pinned
- security

# Label to use when marking an issue as stale
staleLabel: wontfix

# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed in 7 days if no further activity occurs.
If the issue is still valid, please add a respective comment to prevent this
issue from being closed automatically. Thank you for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
132 changes: 132 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# SPDX-FileCopyrightText: © Vegard IT GmbH (https://vegardit.com) and contributors
# SPDX-FileContributor: Sebastian Thomschke
# SPDX-License-Identifier: MIT
# SPDX-ArtifactOfProjectHomePage: https://github.com/vegardit/haxe-clink-externs
#
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
name: Build

on:
push:
branches: # build all branches
- '**'
tags-ignore: # but don't build tags
- '**'
paths-ignore:
- '**/*.adoc'
- '**/*.md'
- '.editorconfig'
- '.git*'
- '.github/*.yml'
- 'tools'
pull_request:
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 after tests ran:"
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

defaults:
run:
shell: bash

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-latest
haxe:
- nightly
- 4.2.5
steps:
- name: Show environment variables
run: env | sort

- name: Git Checkout
uses: actions/checkout@v3 #https://github.com/actions/checkout


- name: "Install: Clink"
run: |
set -eux
pushd $HOME
curl -sSfL https://github.com/chrisant996/clink/releases/download/v1.4.19/clink.1.4.19.57e404.zip -o clink.zip
unzip clink.zip -d clink
cp clink/clink_x64.exe clink/clink.exe
cat <<EOF > $HOME/clink/lua.cmd
$(cygpath -w "$HOME/clink/clink") lua %*
EOF
cat <<EOF > $HOME/clink/lua
#!/bin/sh
$HOME/clink/clink lua "\$@"
EOF
chmod 777 clink/lua
echo "$(cygpath -w "$HOME/clink")" >> $GITHUB_PATH
- name: "Verify: Clink and Lua"
run: |
set -eux
clink --version
lua -v
- name: "Install Haxe and Haxelibs"
uses: vegardit/haxe-reusable-workflows/.github/actions/setup-haxe@dev
with:
haxe-reusable-workflows-version: dev

haxe-version: ${{ matrix.haxe }}
haxe-libs: haxe-doctest no-spoon

- name: "Run Tests"
run: |
set -eux
haxe tests.hxml
lua target/lua/TestRunner.lua
##################################################
# Setup SSH debug session
##################################################
- name: "SSH session for debugging: check"
id: DEBUG_SSH_SESSSION_CHECK
if: always()
shell: bash
run: |
set -eu
job_filter_pattern="${{ inputs.debug-with-ssh-only-jobs-matching }}"
echo "job_filter: $job_filter_pattern"
job_info=$(echo "$GITHUB_JOB ${{ runner.os }} haxe-${{ matrix.haxe-version }}" | tr -d '\n')
echo "job_info: $job_info"
if [[ "$job_info" =~ .*$job_filter_pattern.* ]] && case "${{ job.status }}" in
success) [[ "${{ inputs.debug-with-ssh }}" == always ]] ;;
cancelled) [[ "${{ inputs.debug-with-ssh }}" == on_failure_or_cancelled ]] ;;
failure) [[ "${{ inputs.debug-with-ssh }}" =~ on_failure.* ]] ;;
esac; then
echo "start_session=true" | tee -a "$GITHUB_OUTPUT"
fi
- name: "SSH session for debugging: start"
uses: mxschmitt/action-tmate@v3 # https://github.com/mxschmitt/action-tmate
if: always() && steps.DEBUG_SSH_SESSSION_CHECK.outputs.start_session
with:
limit-access-to-actor: ${{ inputs.debug-with-ssh-only-for-actor }}
34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Local work folder that is not checked in
_LOCAL/

# Eclipse
.settings/
.project
**/.*.md.html

# IntelliJ
.idea
*.iml
*.ipr
*.iws

# Eclipse Theia
.theia

# Visual Studio Code
.vscode

# OSX
.DS_Store

# Vim
*.swo
*.swp

# Temp files
.history
*.tmp
*.bak
/dump
/target
/tools/dump
Loading

0 comments on commit 860ffbf

Please sign in to comment.