-
Notifications
You must be signed in to change notification settings - Fork 2.1k
61 lines (59 loc) · 1.74 KB
/
amd64_linux_bazel.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# ref: https://github.com/actions/runner-images
name: amd64 Linux Bazel
on: [push, pull_request, workflow_dispatch]
# Building using the github runner environement directly.
jobs:
native:
strategy:
matrix:
python: [
{version: '3.9'},
{version: '3.10'},
{version: '3.11'},
{version: '3.12'},
]
fail-fast: false
name: Linux • Bazel • Python-${{ matrix.python.version }}
runs-on: ubuntu-latest
env:
CC: gcc-12
CXX: g++-12
steps:
- uses: actions/checkout@v4
- name: Check Java
run: java -version
- name: Check mvn
run: mvn --version
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python.version }}
- name: Check Python
run: python --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: Change Python in WORKSPACE
run: >
sed
-i
's/\(DEFAULT_PYTHON =\) "3.[0-9]\+"/\1 "${{ matrix.python.version }}"/g'
WORKSPACE
- name: Build
run: >
bazel build
-c opt
--subcommands=pretty_print
//ortools/... //examples/...
- name: Test
run: >
bazel test
-c opt
--test_output=errors
//ortools/... //examples/...