Skip to content

Commit

Permalink
migrate from travis to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nadako committed Jun 20, 2022
1 parent be3304c commit e5206be
Show file tree
Hide file tree
Showing 14 changed files with 108 additions and 15 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
push:
pull_request:
branches: [ develop ]

jobs:
test:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.haxe-version == 'nightly' }}
strategy:
matrix:
haxe-version:
- 4.2.5
- nightly

steps:
- name: Check out repo
uses: actions/checkout@v2

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache Yarn
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Cache Haxe
uses: actions/cache@v1
with:
path: ${{ startsWith(runner.os, 'windows') && '%AppData%' || '~/haxe' }}
key: ${{ runner.os }}-haxe

- name: Install Lix
uses: lix-pm/setup-lix@master

- name: Install Haxe
run: lix install haxe ${{ matrix.haxe-version }}

- name: Install Haxe Libraries
run: lix download

- name: Build everything
run: haxe build.hxml

- name: Run Tests
run: lix run travix node tests-html5.hxml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/playground.js.map
/node_modules
/package-lock.json
/bin
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions haxe_libraries/hxnodejs.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @install: lix --silent download "gh://github.com/haxefoundation/hxnodejs#e37e79fce8a2a2177a0a73ce9d8eff2acdbcfa8b" into hxnodejs/12.1.0/github/e37e79fce8a2a2177a0a73ce9d8eff2acdbcfa8b
-cp ${HAXE_LIBCACHE}/hxnodejs/12.1.0/github/e37e79fce8a2a2177a0a73ce9d8eff2acdbcfa8b/src
-D hxnodejs=12.1.0
--macro allowPackage('sys')
# should behave like other target defines and not be defined in macro context
--macro define('nodejs')
--macro _internal.SuppressDeprecated.run()
2 changes: 2 additions & 0 deletions haxe_libraries/openfl.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-cp ${SCOPE_DIR}/./src
-D openfl=7.1.1
3 changes: 3 additions & 0 deletions haxe_libraries/tink_chunk.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @install: lix --silent download "haxelib:/tink_chunk#0.4.0" into tink_chunk/0.4.0/haxelib
-cp ${HAXE_LIBCACHE}/tink_chunk/0.4.0/haxelib/src
-D tink_chunk=0.4.0
8 changes: 8 additions & 0 deletions haxe_libraries/tink_cli.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @install: lix --silent download "haxelib:/tink_cli#0.5.1" into tink_cli/0.5.1/haxelib
-lib tink_io
-lib tink_macro
-lib tink_stringly
-cp ${HAXE_LIBCACHE}/tink_cli/0.5.1/haxelib/src
-D tink_cli=0.5.1
# Make sure docs are generated
-D use-rtti-doc
3 changes: 3 additions & 0 deletions haxe_libraries/tink_core.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @install: lix --silent download "haxelib:/tink_core#2.0.2" into tink_core/2.0.2/haxelib
-cp ${HAXE_LIBCACHE}/tink_core/2.0.2/haxelib/src
-D tink_core=2.0.2
5 changes: 5 additions & 0 deletions haxe_libraries/tink_io.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @install: lix --silent download "haxelib:/tink_io#0.9.0" into tink_io/0.9.0/haxelib
-lib tink_chunk
-lib tink_streams
-cp ${HAXE_LIBCACHE}/tink_io/0.9.0/haxelib/src
-D tink_io=0.9.0
4 changes: 4 additions & 0 deletions haxe_libraries/tink_macro.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# @install: lix --silent download "haxelib:/tink_macro#1.0.0" into tink_macro/1.0.0/haxelib
-lib tink_core
-cp ${HAXE_LIBCACHE}/tink_macro/1.0.0/haxelib/src
-D tink_macro=1.0.0
6 changes: 6 additions & 0 deletions haxe_libraries/tink_streams.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# @install: lix --silent download "haxelib:/tink_streams#0.4.0" into tink_streams/0.4.0/haxelib
-lib tink_core
-cp ${HAXE_LIBCACHE}/tink_streams/0.4.0/haxelib/src
-D tink_streams=0.4.0
# temp for development, delete this file when pure branch merged
-D pure
4 changes: 4 additions & 0 deletions haxe_libraries/tink_stringly.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# @install: lix --silent download "haxelib:/tink_stringly#0.5.0" into tink_stringly/0.5.0/haxelib
-lib tink_core
-cp ${HAXE_LIBCACHE}/tink_stringly/0.5.0/haxelib/src
-D tink_stringly=0.5.0
7 changes: 7 additions & 0 deletions haxe_libraries/travix.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @install: lix --silent download "haxelib:/travix#0.15.3" into travix/0.15.3/haxelib
# @post-install: cd ${HAXE_LIBCACHE}/travix/0.15.3/haxelib && haxe -cp src --run travix.PostDownload
# @run: haxelib run-dir travix "${HAXE_LIBCACHE}/travix/0.15.3/haxelib"
-lib tink_cli
-cp ${HAXE_LIBCACHE}/travix/0.15.3/haxelib/src
-D travix=0.15.3
--macro travix.Macro.setup()
5 changes: 5 additions & 0 deletions haxe_libraries/utest.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @install: lix --silent download "gh://github.com/haxe-utest/utest#5de48a964ca75c8e6321ac9706346a24958af2a4" into utest/1.13.2/github/5de48a964ca75c8e6321ac9706346a24958af2a4
-cp ${HAXE_LIBCACHE}/utest/1.13.2/github/5de48a964ca75c8e6321ac9706346a24958af2a4/src
-D utest=1.13.2
--macro utest.utils.Macro.checkHaxe()
--macro utest.utils.Macro.importEnvSettings()

0 comments on commit e5206be

Please sign in to comment.