36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
# ref: https://github.com/actions/runner-images
|
|
name: Bazel Linux
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
schedule:
|
|
# min hours day(month) month day(week)
|
|
- cron: '0 0 7,22 * *'
|
|
|
|
jobs:
|
|
# Building using the github runner environement directly.
|
|
bazel:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CC: gcc-12
|
|
CXX: g++-12
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v3
|
|
- name: Check java
|
|
run: java -version
|
|
- name: Install Bazel
|
|
run: |
|
|
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg
|
|
sudo mv bazel.gpg /etc/apt/trusted.gpg.d/
|
|
echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
|
|
sudo apt-get update
|
|
sudo apt-get install bazel
|
|
- name: Check Bazel
|
|
run: bazel version
|
|
- name: Build
|
|
run: bazel build -c opt --cxxopt=-std=c++17 --subcommands=true //ortools/... //examples/...
|
|
- name: Test
|
|
run: bazel test -c opt --cxxopt=-std=c++17 --test_output=errors //ortools/... //examples/...
|