Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
RblSb committed May 13, 2020
1 parent 727a641 commit 0a180f8
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 226 deletions.
204 changes: 24 additions & 180 deletions .github/workflows/main.yml

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions extra/github-actions/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ class Main {
static final matchImport = ~/^([ \t]*)@import (.+)$/gm;
static final matchRunnable = ~/^([ \t]*)jobs:/gm;

static function main():Void new Main();

function new() {
static function main():Void {
final folder = FileSystem.absolutePath(".");
final outFolder = "../../.github";

Expand All @@ -38,7 +36,7 @@ class Main {
});
}

function iterFolderItems(dir:String, func:(dir:String, name:String)->Void):Void {
static function iterFolderItems(dir:String, func:(dir:String, name:String)->Void):Void {
for (name in FileSystem.readDirectory(dir)) {
if (FileSystem.isDirectory(name)) iterFolderItems('$dir/$name', func);
func(dir, name);
Expand Down
2 changes: 1 addition & 1 deletion extra/github-actions/build-mac.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- name: Install dependencies
run: |
set -ex
brew update || brew update || brew update
brew update
brew unlink python@2
brew bundle --file=tests/Brewfile --no-upgrade
Expand Down
23 changes: 0 additions & 23 deletions extra/github-actions/install-neko.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,43 +11,20 @@
Write-Host "::set-env name=NEKOPATH::$NEKOPATH"
- name: Install Neko using snapshot from S3 (Unix)
# if: (!startsWith(env.PLATFORM, 'windows'))
if: (startsWith(env.PLATFORM, 'linux'))
run: |
set -ex
sudo add-apt-repository ppa:haxe/snapshots -y
sudo apt-get update -qqy
sudo apt-get install -qqy neko
# DOWNLOADDIR="./temp"
# mkdir $DOWNLOADDIR
# curl -sSL https://build.haxe.org/builds/neko/$PLATFORM/neko_latest.tar.gz -o $DOWNLOADDIR/neko_latest.tar.gz
# tar -xf $DOWNLOADDIR/neko_latest.tar.gz -C $DOWNLOADDIR
# NEKOPATH=`echo $DOWNLOADDIR/neko-*-*`
# sudo mkdir -p /usr/local/bin
# sudo mkdir -p /usr/local/lib/neko
# sudo ln -s $NEKOPATH/{neko,nekoc,nekoml,nekotools} /usr/local/bin/
# sudo ln -s $NEKOPATH/libneko.* /usr/local/lib/
# sudo ln -s $NEKOPATH/*.ndll /usr/local/lib/neko/
# sudo ln -s $NEKOPATH/nekoml.std /usr/local/lib/neko/
# sudo ln -s $NEKOPATH/include/*.h /usr/local/include/
# set +x
# echo "::add-path::$NEKOPATH"
# echo "::set-env name=NEKOPATH::$NEKOPATH"
- name: Install Neko using snapshot from S3 (Mac)
if: (startsWith(env.PLATFORM, 'mac'))
run: |
set -ex
HOMEBREW_NO_AUTO_UPDATE=1
brew install neko
- name: ldconfig
if: env.PLATFORM == 'linux64'
run: |
sudo ldconfig
sudo ldconfig /usr/local/lib
- name: Print Neko version
run: neko -version 2>&1

5 changes: 2 additions & 3 deletions extra/github-actions/test-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@

- name: Test
run: |
# LC_CTYPE=C
# LANG=C
# disable invalid Unicode filenames on APFS
echo "" > sys/compile-fs.hxml
haxe RunCi.hxml
working-directory: ${{github.workspace}}/tests

11 changes: 9 additions & 2 deletions extra/github-actions/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
cmd /c mklink $py3path $pypath
python3 -V
- name: Install hererocks
if: matrix.target == 'lua'
shell: cmd
run: |
pip install hererocks
hererocks lua53 -l5.3 -rlatest
call lua53/bin/activate
- name: Setup haxelib
shell: pwsh
run: |
Expand All @@ -36,6 +44,5 @@
- name: Test
shell: pwsh
run: |
haxe RunCi.hxml
run: haxe RunCi.hxml
working-directory: ${{github.workspace}}/tests
14 changes: 3 additions & 11 deletions extra/github-actions/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on: [push, pull_request]
jobs:
windows64-build:
runs-on: windows-latest
# if: false
env:
PLATFORM: windows64
OPAMYES: 1
Expand All @@ -23,7 +22,6 @@ jobs:

windows-build:
runs-on: windows-latest
# if: false
env:
PLATFORM: windows
OPAMYES: 1
Expand All @@ -42,7 +40,6 @@ jobs:

linux-build:
runs-on: ubuntu-latest
# if: false
env:
PLATFORM: linux64
OPAMYES: 1
Expand All @@ -55,7 +52,6 @@ jobs:

mac-build:
runs-on: macos-latest
# if: false
env:
PLATFORM: mac
OPAMYES: 1
Expand All @@ -78,8 +74,7 @@ jobs:
strategy:
fail-fast: false
matrix:
# TODO. Lua/flash has never been enabled on our AppVeyor builds.
target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, neko]
target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, lua, neko]
steps:
- uses: actions/checkout@master
with:
Expand All @@ -94,7 +89,6 @@ jobs:
windows-test:
needs: windows-build
runs-on: windows-latest
# if: false
env:
PLATFORM: windows
TEST: ${{matrix.target}}
Expand All @@ -103,9 +97,8 @@ jobs:
strategy:
fail-fast: false
matrix:
# TODO. Lua/flash has never been enabled on our AppVeyor builds.
# jvm: https://github.com/HaxeFoundation/haxe/issues/8601
target: [macro, js, hl, cpp, java, cs, php, python, neko]
# TODO jvm: https://github.com/HaxeFoundation/haxe/issues/8601
target: [macro, js, hl, cpp, java, cs, php, python, lua, neko]
steps:
- uses: actions/checkout@master
with:
Expand Down Expand Up @@ -155,7 +148,6 @@ jobs:
mac-test:
needs: mac-build
runs-on: macos-latest
# if: false
env:
PLATFORM: mac
TEST: ${{matrix.target}}
Expand Down
4 changes: 2 additions & 2 deletions tests/runci/targets/Flash.hx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Flash {
File.saveContent(mmcfgPath, "ErrorReportingEnable=1\nTraceOutputFileEnable=1");
}
switch (ci) {
case AzurePipelines, GithubActions:
case AzurePipelines | GithubActions:
runCommand("xvfb-run", ["-a", playerCmd, "-v"]);
case _:
runCommand(playerCmd, ["-v"]);
Expand Down Expand Up @@ -101,7 +101,7 @@ class Flash {
switch (systemName) {
case "Linux":
switch (ci) {
case AzurePipelines, GithubActions:
case AzurePipelines | GithubActions:
new Process("xvfb-run", ["-a", playerCmd, swf]);
case _:
new Process(playerCmd, [swf]);
Expand Down

0 comments on commit 0a180f8

Please sign in to comment.