Skip to content

Make LogWeight and TropicalWeight constructor explicit #11

Make LogWeight and TropicalWeight constructor explicit

Make LogWeight and TropicalWeight constructor explicit #11

# Copyright 2026 The OpenFst Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# See https://github.com/actions/runner-images.
name: "Bazel build (x64 Linux)"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
jobs:
build-and-test-x64-linux-bazel:
name: Build and Test (x64 Linux, Bazel)
runs-on: ubuntu-latest
env:
BAZEL: bazelisk-linux-amd64
USE_BAZEL_VERSION: 9.0.0
cache-name: ${{github.job}}
cache-path: "~/.cache/bazel"
steps:
- uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
- name: Check Python
run: python --version
- name: Install Bazelisk
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/latest/download/$BAZEL"
chmod +x $BAZEL
- name: Check Bazelisk
run: ./$BAZEL --version
- name: Restore Bazel cache
uses: actions/cache/restore@v5
id: bazel-cache-restore
with:
path: ${{env.cache-path}}
key: bazel-cache-${{env.cache-name}}
restore-keys: bazel-cache-${{env.cache-name}}-
- name: Build
run: |
./$BAZEL build -c opt //...
- name: Test
run: |
./$BAZEL test -c opt --test_size_filters=-enormous --test_output=errors //...
- name: Save new cache for main
if: github.ref == 'refs/heads/main'
uses: actions/cache/save@v5
with:
path: ${{env.cache-path}}
key: bazel-cache-${{env.cache-name}}-${{github.run_id}}