-# This is a basic workflow to help you get started with Actions
-
-name: Build
-
-# Controls when the workflow will run
-on:
- # Triggers the workflow on push or pull request events but only for the main branch
- push:
- branches: [ main ]
- pull_request:
- branches: [ main ]
-
- # Allows you to run this workflow manually from the Actions tab
- workflow_dispatch:
-
-# A workflow run is made up of one or more jobs that can run sequentially or in parallel
-jobs:
- # This workflow contains a single job called "build"
- build:
- # The type of runner that the job will run on
- runs-on: ubuntu-latest
- # Steps represent a sequence of tasks that will be executed as part of the job
- steps:
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v2
- - name: Setup Bazelisk
- # You may pin to the exact commit or the version.
- # uses: bazelbuild/setup-bazelisk@2351cf5a7584ce72638fbce7c22e5128a5fcd5b2
- uses: bazelbuild/setup-bazelisk@v1.0.1
- with:
- # The Bazelisk version to download (if necessary) and use. Supports semver spec and ranges.
- bazelisk-version: 1.x # optional, default is 1.x
- # Used to query bazelisk releases. Since there's a default, this is typically not supplied by the user.
- token: ${{ github.token }}
- # Runs a set of commands using the runners shell
- - name: Execute build script
- run: |
- sudo apt-get install -y pkg-config libssl-dev
- bazel run //:gazelle
- bazel run @cargo_raze//:raze -- --manifest-path=$(realpath rest-ralimiter/Cargo.toml)
- bazel build //...
- - name: Bazel artifacts
- uses: actions/upload-artifact@v2
- with:
- name: bazel-artifacts
- path: |
- bazel-out/
- bazel-bin/
+# This is a basic workflow to help you get started with Actions\r
+\r
+name: Build\r
+\r
+# Controls when the workflow will run\r
+on:\r
+ # Triggers the workflow on push or pull request events but only for the main branch\r
+ push:\r
+ branches: [ main ]\r
+ pull_request:\r
+ branches: [ main ]\r
+\r
+ # Allows you to run this workflow manually from the Actions tab\r
+ workflow_dispatch:\r
+\r
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel\r
+jobs:\r
+ # This workflow contains a single job called "build"\r
+ build:\r
+ # The type of runner that the job will run on\r
+ runs-on: ubuntu-latest\r
+ # Steps represent a sequence of tasks that will be executed as part of the job\r
+ steps:\r
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it\r
+ - uses: actions/checkout@v2\r
+ - name: Setup Bazelisk\r
+ # You may pin to the exact commit or the version.\r
+ # uses: bazelbuild/setup-bazelisk@2351cf5a7584ce72638fbce7c22e5128a5fcd5b2\r
+ uses: bazelbuild/setup-bazelisk@v1.0.1\r
+ with:\r
+ # The Bazelisk version to download (if necessary) and use. Supports semver spec and ranges.\r
+ bazelisk-version: 1.x # optional, default is 1.x\r
+ # Used to query bazelisk releases. Since there's a default, this is typically not supplied by the user.\r
+ token: ${{ github.token }}\r
+ # Runs a single command using the runners shell\r
+ - name: Mount bazel cache # Optional\r
+ uses: actions/cache@v2\r
+ with:\r
+ path: "~/.cache/bazel"\r
+ key: bazel\r
+ # Runs a set of commands using the runners shell\r
+ - name: Execute build script\r
+ run: |\r
- bazel run //:gazelle \r
- bazel run @cargo_raze//:raze -- --manifest-path=$(realpath rest-ralimiter/Cargo.toml)\r
+ bazel build //...\r
+ - name: Bazel artifacts\r
+ uses: actions/upload-artifact@v2\r
+ with:\r
+ name: bazel-artifacts\r
+ path: |\r
+ bazel-out/\r
+ bazel-bin/\r
- [package]\r
- name = "rest-ratelimiter"\r
- version = "0.1.0"\r
- edition = "2018"\r
- \r
- [dependencies]\r
- tonic = "0.5"\r
- prost = "0.8"\r
- tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }\r
- \r
- [[bin]]\r
- name = "rest-ratelimiter"\r
- path = "src/main.rs"\r
- \r
- [dev-dependencies]\r
- tonic-build = "0.5"\r
- \r
- [package.metadata.raze]\r
- workspace_path = "//rest-ratelimiter/cargo"\r
- genmode = "Remote"\r
- default_gen_buildrs = true\r
- package_aliases_dir = "cargo"\r
+ [package]
+ name = "rest-ratelimiter"
+ version = "0.1.0"
+ edition = "2018"
+
+ [dependencies]
+ tonic = "0.5"
+ prost = "0.8"
-openssl-sys = "0.9"
-openssl = "0.10"
+ tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }
+
-[build-dependencies]
++[[bin]]
++name = "rest-ratelimiter"
++path = "src/main.rs"
++
++[dev-dependencies]
+ tonic-build = "0.5"
+
+ [package.metadata.raze]
-# The path at which to write output files.
-#
-# `cargo raze` will generate Bazel-compatible BUILD files into this path.
-# This can either be a relative path (e.g. "foo/bar"), relative to this
-# Cargo.toml file; or relative to the Bazel workspace root (e.g. "//foo/bar").
-workspace_path = "//rest-ratelimiter"
++workspace_path = "//rest-ratelimiter/cargo"
+ genmode = "Remote"
+ default_gen_buildrs = true
-
++package_aliases_dir = "cargo"