diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 30233bbc..c5f8b694 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,3 +51,6 @@ jobs: - name: Building //csharp directory run: bazel build //csharp/... + + - name: Building //perl directory + run: bazel build //perl/... \ No newline at end of file diff --git a/WORKSPACE b/WORKSPACE index 4224bced..34227417 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -237,3 +237,18 @@ load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "dotnet_register_toolchains", "d dotnet_register_toolchains() dotnet_repositories_nugets() + +http_archive( + name = "rules_perl", + sha256 = "8a7a33cb3c81a0677f11b1a9c5384bc9eefaec833913bd313a6494c2783a6046", + strip_prefix = "rules_perl-022b8daf2bb4836ac7a50e4a1d8ea056a3e1e403", + urls = [ + "https://storage.googleapis.com/engflow-tools-public/rules_perl-022b8daf2bb4836ac7a50e4a1d8ea056a3e1e403.zip", + "https://github.com/bazelbuild/rules_perl/archive/022b8daf2bb4836ac7a50e4a1d8ea056a3e1e403.zip", + ], +) + +load("@rules_perl//perl:deps.bzl", "perl_register_toolchains", "perl_rules_dependencies") + +perl_rules_dependencies() +perl_register_toolchains() diff --git a/perl/BUILD b/perl/BUILD new file mode 100644 index 00000000..20793dde --- /dev/null +++ b/perl/BUILD @@ -0,0 +1,6 @@ +load("@rules_perl//perl:perl.bzl", "perl_binary") + +perl_binary( + name = "perl", + srcs = ["hello_world.pl"] +) \ No newline at end of file diff --git a/perl/hello_world.pl b/perl/hello_world.pl new file mode 100644 index 00000000..0365438c --- /dev/null +++ b/perl/hello_world.pl @@ -0,0 +1,3 @@ +#!/usr/bin/perl +use warnings; +print("Hello, World!\n"); \ No newline at end of file