Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup-neko/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ runs:
run: |
set -ex

curl -sSL https://build.haxe.org/builds/neko/$PLATFORM/neko_latest.tar.gz -o $RUNNER_TEMP/neko_latest.tar.gz
curl -sSL --retry 3 --retry-delay 5 --fail https://build.haxe.org/builds/neko/$PLATFORM/neko_latest.tar.gz -o $RUNNER_TEMP/neko_latest.tar.gz
tar -xf $RUNNER_TEMP/neko_latest.tar.gz -C $RUNNER_TEMP
NEKOPATH=`echo $RUNNER_TEMP/neko-*-*`
sudo mkdir -p /usr/local/bin
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,31 @@ jobs:
if: matrix.target == 'flash'
run: export DISPLAY=:99.0

- name: Get hashlink HEAD sha
id: hashlink-sha
if: matrix.target == 'hl'
run: echo "sha=$(git ls-remote https://github.com/HaxeFoundation/hashlink.git HEAD | cut -f1)" >> $GITHUB_OUTPUT

- name: Cache hashlink
uses: actions/cache@v4
if: matrix.target == 'hl'
with:
path: |
~/haxe-ci/downloads/hashlink
~/haxe-ci/hashlink
key: hashlink-linux-${{ matrix.arch }}-${{ steps.hashlink-sha.outputs.sha }}
restore-keys: |
hashlink-linux-${{ matrix.arch }}-

- name: Cache Lua environments
uses: actions/cache@v4
if: matrix.target == 'lua'
with:
path: ~/haxe-ci/lua_env
key: lua-env-linux-${{ matrix.arch }}-${{ hashFiles('tests/runci/targets/Lua.hx') }}-v1
restore-keys: |
lua-env-linux-${{ matrix.arch }}-

- name: Test
run: haxe -D include_legacy --run RunCi ${{ matrix.target }} ${{ matrix.runci-args }}
working-directory: ${{github.workspace}}/tests
Expand Down Expand Up @@ -480,6 +505,23 @@ jobs:
restore-keys: |
lua-env-windows64-

- name: Get hashlink HEAD sha
id: hashlink-sha
if: matrix.target == 'hl'
shell: pwsh
run: echo "sha=$(git ls-remote https://github.com/HaxeFoundation/hashlink.git HEAD | ForEach-Object { $_.Split()[0] })" >> $env:GITHUB_OUTPUT

- name: Cache hashlink
uses: actions/cache@v4
if: matrix.target == 'hl'
with:
path: |
~/haxe-ci/downloads/hashlink
~/haxe-ci/hashlink
key: hashlink-windows64-${{ steps.hashlink-sha.outputs.sha }}
restore-keys: |
hashlink-windows64-

- name: Test
shell: pwsh
run: haxe RunCi.hxml -D include_legacy
Expand Down Expand Up @@ -575,6 +617,31 @@ jobs:
mkdir ~/haxelib
haxelib setup ~/haxelib

- name: Get hashlink HEAD sha
id: hashlink-sha
if: matrix.target == 'hl'
run: echo "sha=$(git ls-remote https://github.com/HaxeFoundation/hashlink.git HEAD | cut -f1)" >> $GITHUB_OUTPUT

- name: Cache hashlink
uses: actions/cache@v4
if: matrix.target == 'hl'
with:
path: |
~/haxe-ci/downloads/hashlink
~/haxe-ci/hashlink
key: hashlink-mac-${{ matrix.arch }}-${{ steps.hashlink-sha.outputs.sha }}
restore-keys: |
hashlink-mac-${{ matrix.arch }}-

- name: Cache Lua environments
uses: actions/cache@v4
if: matrix.target == 'lua'
with:
path: ~/haxe-ci/lua_env
key: lua-env-mac-${{ matrix.arch }}-${{ hashFiles('tests/runci/targets/Lua.hx') }}-v1
restore-keys: |
lua-env-mac-${{ matrix.arch }}-

- name: Test
run: |
# disable invalid Unicode filenames on APFS
Expand Down
78 changes: 39 additions & 39 deletions tests/runci/targets/Hl.hx
Original file line number Diff line number Diff line change
Expand Up @@ -30,47 +30,47 @@ class Hl {
static var withHlcTests = true;

static public function getHlDependencies() {
if (FileSystem.exists(hlBinary)) {
infoMsg('hl has already been installed at $hlBinary.');
return;
}
if (!FileSystem.exists(hlSrc))
runCommand("git", ["clone", "https://github.com/HaxeFoundation/hashlink.git", hlSrc]);
else
infoMsg("Reusing hashlink repository");

switch (systemName) {
case "Linux":
Linux.requireAptPackages(["libpng-dev", "libjpeg-turbo8-dev", "libturbojpeg", "zlib1g-dev", "libvorbis-dev", "libsqlite3-dev"]);
case "Mac":
case "Windows":
//pass
}
if (!FileSystem.exists(hlBinary)) {
if (!FileSystem.exists(hlSrc))
runCommand("git", ["clone", "--depth=1", "https://github.com/HaxeFoundation/hashlink.git", hlSrc]);
else
infoMsg("Reusing hashlink repository");

switch (systemName) {
case "Linux":
Linux.requireAptPackages(["libpng-dev", "libjpeg-turbo8-dev", "libturbojpeg", "zlib1g-dev", "libvorbis-dev", "libsqlite3-dev"]);
case "Mac":
case "Windows":
//pass
}

FileSystem.createDirectory(hlBuild);
final args = systemName == "Windows" ? ["-DCMAKE_SYSTEM_VERSION=10.0.19041.0"] : ["-GNinja"];
if (systemName == "Mac") {
args.push("-DDOWNLOAD_DEPENDENCIES=ON");
FileSystem.createDirectory(hlBuild);
final args = systemName == "Windows" ? ["-DCMAKE_SYSTEM_VERSION=10.0.19041.0"] : ["-GNinja"];
if (systemName == "Mac") {
args.push("-DDOWNLOAD_DEPENDENCIES=ON");
}
runCommand("cmake", args.concat([
"-DBUILD_TESTING=OFF",
"-DWITH_DIRECTX=OFF",
"-DWITH_FMT=ON",
"-DWITH_OPENAL=OFF",
"-DWITH_SDL=OFF",
"-DWITH_SQLITE=ON",
"-DWITH_SSL=ON",
"-DWITH_UI=OFF",
"-DWITH_UV=OFF",
"-DWITH_VIDEO=OFF",
"-DCMAKE_INSTALL_PREFIX=" + hlInstallDir,
"-B" + hlBuild,
"-H" + hlSrc
]));
runCommand("cmake", [
"--build", hlBuild
]);
runCommand("cmake", ["--build", hlBuild, "--target", "install"]);
} else {
infoMsg('hl has already been installed at $hlBinary.');
}
runCommand("cmake", args.concat([
"-DBUILD_TESTING=OFF",
"-DWITH_DIRECTX=OFF",
"-DWITH_FMT=ON",
"-DWITH_OPENAL=OFF",
"-DWITH_SDL=OFF",
"-DWITH_SQLITE=ON",
"-DWITH_SSL=ON",
"-DWITH_UI=OFF",
"-DWITH_UV=OFF",
"-DWITH_VIDEO=OFF",
"-DCMAKE_INSTALL_PREFIX=" + hlInstallDir,
"-B" + hlBuild,
"-H" + hlSrc
]));
runCommand("cmake", [
"--build", hlBuild
]);
runCommand("cmake", ["--build", hlBuild, "--target", "install"]);

addToPATH(hlInstallBinDir);
addToLIBPATH(hlInstallLibDir);
Expand Down
4 changes: 2 additions & 2 deletions tests/runci/targets/Macro.hx
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ class Macro {

static function party() {
changeDirectory(partyDir);
runCommand("git", ["clone", "https://github.com/haxetink/tink_core", "tink_core"]);
runCommand("git", ["clone", "--depth=1", "https://github.com/haxetink/tink_core", "tink_core"]);
changeDirectory("tink_core");
runCommand("haxelib", ["newrepo"]);
runCommand("haxelib", ["install", "tests.hxml", "--always"]);
runCommand("haxelib", ["dev", "tink_core", "."]);
runCommand("haxe", ["tests.hxml", "-w", "-WDeprecated", "--interp", "--macro", "addMetadata('@:exclude','Futures','testDelay')"]);

changeDirectory(partyDir);
runCommand("git", ["clone", "-b", Config.hxcoroVersion, "https://github.com/HaxeFoundation/hxcoro", "hxcoro"]);
runCommand("git", ["clone", "--depth=1", "-b", Config.hxcoroVersion, "https://github.com/HaxeFoundation/hxcoro", "hxcoro"]);
changeDirectory("hxcoro");
runCommand("haxelib", ["newrepo"]);
runCommand("haxelib", ["git", "utest", "https://github.com/haxe-utest/utest.git"]);
Expand Down
Loading