From 0e44bfc6bcc068da6b8bab4128116e053be4b49a Mon Sep 17 00:00:00 2001 From: Kristian Larsson Date: Wed, 28 Aug 2024 00:15:23 +0200 Subject: [PATCH] Allow concurrency for cross-compile tests This is rather crude but as we have a project lock, we cannot get concurrency when doing the cross-compilation tests to various platforms when we are using the same project. The simple workaround is to compile different projects! --- compiler/test.hs | 12 ++++++------ test/compiler/hello_aarch64-macos-none/.gitignore | 3 +++ test/compiler/hello_aarch64-macos-none/Acton.toml | 0 test/compiler/hello_aarch64-macos-none/src/hello.act | 6 ++++++ test/compiler/hello_aarch64-windows-gnu/.gitignore | 3 +++ test/compiler/hello_aarch64-windows-gnu/Acton.toml | 0 .../compiler/hello_aarch64-windows-gnu/src/hello.act | 6 ++++++ test/compiler/hello_x86_64-linux-gnu.2.27/.gitignore | 3 +++ test/compiler/hello_x86_64-linux-gnu.2.27/Acton.toml | 0 .../hello_x86_64-linux-gnu.2.27/src/hello.act | 6 ++++++ test/compiler/hello_x86_64-linux-musl/.gitignore | 3 +++ test/compiler/hello_x86_64-linux-musl/Acton.toml | 0 test/compiler/hello_x86_64-linux-musl/src/hello.act | 6 ++++++ test/compiler/hello_x86_64-macos-none/.gitignore | 3 +++ test/compiler/hello_x86_64-macos-none/Acton.toml | 0 test/compiler/hello_x86_64-macos-none/src/hello.act | 6 ++++++ test/compiler/hello_x86_64-windows-gnu/.gitignore | 3 +++ test/compiler/hello_x86_64-windows-gnu/Acton.toml | 0 test/compiler/hello_x86_64-windows-gnu/src/hello.act | 6 ++++++ 19 files changed, 60 insertions(+), 6 deletions(-) create mode 100644 test/compiler/hello_aarch64-macos-none/.gitignore create mode 100644 test/compiler/hello_aarch64-macos-none/Acton.toml create mode 100644 test/compiler/hello_aarch64-macos-none/src/hello.act create mode 100644 test/compiler/hello_aarch64-windows-gnu/.gitignore create mode 100644 test/compiler/hello_aarch64-windows-gnu/Acton.toml create mode 100644 test/compiler/hello_aarch64-windows-gnu/src/hello.act create mode 100644 test/compiler/hello_x86_64-linux-gnu.2.27/.gitignore create mode 100644 test/compiler/hello_x86_64-linux-gnu.2.27/Acton.toml create mode 100644 test/compiler/hello_x86_64-linux-gnu.2.27/src/hello.act create mode 100644 test/compiler/hello_x86_64-linux-musl/.gitignore create mode 100644 test/compiler/hello_x86_64-linux-musl/Acton.toml create mode 100644 test/compiler/hello_x86_64-linux-musl/src/hello.act create mode 100644 test/compiler/hello_x86_64-macos-none/.gitignore create mode 100644 test/compiler/hello_x86_64-macos-none/Acton.toml create mode 100644 test/compiler/hello_x86_64-macos-none/src/hello.act create mode 100644 test/compiler/hello_x86_64-windows-gnu/.gitignore create mode 100644 test/compiler/hello_x86_64-windows-gnu/Acton.toml create mode 100644 test/compiler/hello_x86_64-windows-gnu/src/hello.act diff --git a/compiler/test.hs b/compiler/test.hs index 6ecbf6785..26363a198 100644 --- a/compiler/test.hs +++ b/compiler/test.hs @@ -178,17 +178,17 @@ crossCompileTests = testGroup "cross-compilation tests" [ testCase "build hello --target aarch64-macos-none --db" $ do - runActon "build --target aarch64-macos-none --db" ExitSuccess False "../test/compiler/hello/" + runActon "build --target aarch64-macos-none --db" ExitSuccess False "../test/compiler/hello_aarch64-macos-none/" , testCase "build hello --target aarch64-windows-gnu" $ do - runActon "build --target aarch64-windows-gnu" ExitSuccess False "../test/compiler/hello/" + runActon "build --target aarch64-windows-gnu" ExitSuccess False "../test/compiler/hello_aarch64-windows-gnu/" , testCase "build hello --target x86_64-macos-none --db" $ do - runActon "build --target x86_64-macos-none --db" ExitSuccess False "../test/compiler/hello/" + runActon "build --target x86_64-macos-none --db" ExitSuccess False "../test/compiler/hello_x86_64-macos-none/" , testCase "build hello --target x86_64-linux-gnu.2.27 --db" $ do - runActon "build --target x86_64-linux-gnu.2.27 --db" ExitSuccess False "../test/compiler/hello/" + runActon "build --target x86_64-linux-gnu.2.27 --db" ExitSuccess False "../test/compiler/hello_x86_64-linux-gnu.2.27/" , testCase "build hello --target x86_64-linux-musl --db" $ do - runActon "build --target x86_64-linux-musl --db" ExitSuccess False "../test/compiler/hello/" + runActon "build --target x86_64-linux-musl --db" ExitSuccess False "../test/compiler/hello_x86_64-linux-musl/" , testCase "build hello --target x86_64-windows-gnu" $ do - runActon "build --target x86_64-windows-gnu" ExitSuccess False "../test/compiler/hello/" + runActon "build --target x86_64-windows-gnu" ExitSuccess False "../test/compiler/hello_x86_64-windows-gnu/" ] -- Creates testgroup from .act files found in specified directory diff --git a/test/compiler/hello_aarch64-macos-none/.gitignore b/test/compiler/hello_aarch64-macos-none/.gitignore new file mode 100644 index 000000000..48d0b0286 --- /dev/null +++ b/test/compiler/hello_aarch64-macos-none/.gitignore @@ -0,0 +1,3 @@ +.actonc.lock +build-cache +out diff --git a/test/compiler/hello_aarch64-macos-none/Acton.toml b/test/compiler/hello_aarch64-macos-none/Acton.toml new file mode 100644 index 000000000..e69de29bb diff --git a/test/compiler/hello_aarch64-macos-none/src/hello.act b/test/compiler/hello_aarch64-macos-none/src/hello.act new file mode 100644 index 000000000..5e143c955 --- /dev/null +++ b/test/compiler/hello_aarch64-macos-none/src/hello.act @@ -0,0 +1,6 @@ +# +# + +actor main(env): + print("Hello World!") + await async env.exit(0) diff --git a/test/compiler/hello_aarch64-windows-gnu/.gitignore b/test/compiler/hello_aarch64-windows-gnu/.gitignore new file mode 100644 index 000000000..48d0b0286 --- /dev/null +++ b/test/compiler/hello_aarch64-windows-gnu/.gitignore @@ -0,0 +1,3 @@ +.actonc.lock +build-cache +out diff --git a/test/compiler/hello_aarch64-windows-gnu/Acton.toml b/test/compiler/hello_aarch64-windows-gnu/Acton.toml new file mode 100644 index 000000000..e69de29bb diff --git a/test/compiler/hello_aarch64-windows-gnu/src/hello.act b/test/compiler/hello_aarch64-windows-gnu/src/hello.act new file mode 100644 index 000000000..5e143c955 --- /dev/null +++ b/test/compiler/hello_aarch64-windows-gnu/src/hello.act @@ -0,0 +1,6 @@ +# +# + +actor main(env): + print("Hello World!") + await async env.exit(0) diff --git a/test/compiler/hello_x86_64-linux-gnu.2.27/.gitignore b/test/compiler/hello_x86_64-linux-gnu.2.27/.gitignore new file mode 100644 index 000000000..48d0b0286 --- /dev/null +++ b/test/compiler/hello_x86_64-linux-gnu.2.27/.gitignore @@ -0,0 +1,3 @@ +.actonc.lock +build-cache +out diff --git a/test/compiler/hello_x86_64-linux-gnu.2.27/Acton.toml b/test/compiler/hello_x86_64-linux-gnu.2.27/Acton.toml new file mode 100644 index 000000000..e69de29bb diff --git a/test/compiler/hello_x86_64-linux-gnu.2.27/src/hello.act b/test/compiler/hello_x86_64-linux-gnu.2.27/src/hello.act new file mode 100644 index 000000000..5e143c955 --- /dev/null +++ b/test/compiler/hello_x86_64-linux-gnu.2.27/src/hello.act @@ -0,0 +1,6 @@ +# +# + +actor main(env): + print("Hello World!") + await async env.exit(0) diff --git a/test/compiler/hello_x86_64-linux-musl/.gitignore b/test/compiler/hello_x86_64-linux-musl/.gitignore new file mode 100644 index 000000000..48d0b0286 --- /dev/null +++ b/test/compiler/hello_x86_64-linux-musl/.gitignore @@ -0,0 +1,3 @@ +.actonc.lock +build-cache +out diff --git a/test/compiler/hello_x86_64-linux-musl/Acton.toml b/test/compiler/hello_x86_64-linux-musl/Acton.toml new file mode 100644 index 000000000..e69de29bb diff --git a/test/compiler/hello_x86_64-linux-musl/src/hello.act b/test/compiler/hello_x86_64-linux-musl/src/hello.act new file mode 100644 index 000000000..5e143c955 --- /dev/null +++ b/test/compiler/hello_x86_64-linux-musl/src/hello.act @@ -0,0 +1,6 @@ +# +# + +actor main(env): + print("Hello World!") + await async env.exit(0) diff --git a/test/compiler/hello_x86_64-macos-none/.gitignore b/test/compiler/hello_x86_64-macos-none/.gitignore new file mode 100644 index 000000000..48d0b0286 --- /dev/null +++ b/test/compiler/hello_x86_64-macos-none/.gitignore @@ -0,0 +1,3 @@ +.actonc.lock +build-cache +out diff --git a/test/compiler/hello_x86_64-macos-none/Acton.toml b/test/compiler/hello_x86_64-macos-none/Acton.toml new file mode 100644 index 000000000..e69de29bb diff --git a/test/compiler/hello_x86_64-macos-none/src/hello.act b/test/compiler/hello_x86_64-macos-none/src/hello.act new file mode 100644 index 000000000..5e143c955 --- /dev/null +++ b/test/compiler/hello_x86_64-macos-none/src/hello.act @@ -0,0 +1,6 @@ +# +# + +actor main(env): + print("Hello World!") + await async env.exit(0) diff --git a/test/compiler/hello_x86_64-windows-gnu/.gitignore b/test/compiler/hello_x86_64-windows-gnu/.gitignore new file mode 100644 index 000000000..48d0b0286 --- /dev/null +++ b/test/compiler/hello_x86_64-windows-gnu/.gitignore @@ -0,0 +1,3 @@ +.actonc.lock +build-cache +out diff --git a/test/compiler/hello_x86_64-windows-gnu/Acton.toml b/test/compiler/hello_x86_64-windows-gnu/Acton.toml new file mode 100644 index 000000000..e69de29bb diff --git a/test/compiler/hello_x86_64-windows-gnu/src/hello.act b/test/compiler/hello_x86_64-windows-gnu/src/hello.act new file mode 100644 index 000000000..5e143c955 --- /dev/null +++ b/test/compiler/hello_x86_64-windows-gnu/src/hello.act @@ -0,0 +1,6 @@ +# +# + +actor main(env): + print("Hello World!") + await async env.exit(0)