-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setup with example_http_archive_resolved from https://github.com/feno…
…llp/bazel_lock Signed-off-by: Pierre Fenoll <[email protected]>
- Loading branch information
Showing
11 changed files
with
1,297 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
on: push | ||
name: Tests | ||
env: | ||
BAZEL: bazelisk | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For GitHub rules | ||
BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
jobs: | ||
test_on_ubuntu: | ||
name: RUN TESTS ON ubuntu | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: ./test.sh | ||
|
||
test_on_macos: | ||
name: RUN TESTS ON macos | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: ./test.sh | ||
|
||
test_on_windows: | ||
name: RUN TESTS ON windows | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: ./test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bazel-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
licenses(["notice"]) # Apache 2.0 | ||
|
||
exports_files(["LICENSE"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
workspace(name = "bazel_upgradable") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# From https://blog.bazel.build/2018/09/28/first-class-resolved-file.html | ||
sync --experimental_repository_resolved_file=resolved.bzl | ||
build --experimental_resolved_file_instead_of_workspace=resolved.bzl | ||
build --experimental_repository_hash_file=resolved.bzl | ||
build --experimental_verify_repository_rules=@bazel_tools//tools/build_defs/repo:git.bzl%git_repository |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
alias( | ||
name = "hello", | ||
actual = select({ | ||
"on_windows": ":hello_on_windows.bat", | ||
"//conditions:default": ":hello_sh", | ||
}), | ||
) | ||
|
||
config_setting( | ||
name = "on_windows", | ||
constraint_values = ["@platforms//os:windows"], | ||
) | ||
|
||
sh_binary( | ||
name = "hello_sh", | ||
srcs = ["hello.sh"], | ||
) | ||
|
||
sh_binary( | ||
name = "hello_on_windows.bat", | ||
srcs = ["hello.bat"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
workspace(name = "example_http_archive_resolved") | ||
|
||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
||
http_archive( | ||
name = "bazel_skylib", | ||
type = "tar.gz", | ||
url = "https://github.com/bazelbuild/bazel-skylib/releases/download/0.8.0/bazel-skylib.0.8.0.tar.gz", | ||
) | ||
|
||
load("@bazel_skylib//lib:versions.bzl", "versions") | ||
|
||
# Not an actual requirement. This is only to demonstrate usage of http_archive | ||
versions.check(minimum_bazel_version = "0.19") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@echo off | ||
echo "Hello!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh -eu | ||
|
||
echo Hello! |
Oops, something went wrong.