Files

114 lines
3.5 KiB
YAML

# Copyright 2022 Google LLC
#
# 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
#
# https://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.
name: Validate
on: [push, pull_request]
env:
FORCE_COLOR: true
jobs:
build-linux:
name: Build Linux
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
- name: Set up Bazelisk
uses: bazel-contrib/setup-bazel@0.18.0
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}
# Share repository cache between workflows.
repository-cache: true
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y ca-certificates gnupg wget
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key \
| gpg --dearmor \
| sudo tee /usr/share/keyrings/apt.llvm.org.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/apt.llvm.org.gpg] https://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" \
| sudo tee /etc/apt/sources.list.d/llvm-21.list
sudo apt-get update
sudo apt-get install -y \
build-essential \
clang-21 \
cmake \
ninja-build \
pkg-config \
libssl-dev \
libsystemd-dev \
libcurlpp-dev \
libasound2-dev \
libunistring-dev \
libldap-dev \
libkrb5-dev \
libgpg-error-dev \
libbluetooth-dev \
libxkbcommon-dev \
patchelf \
qt6-base-dev \
qt6-declarative-dev \
qt6-wayland \
qt6-tools-dev \
qt6-tools-dev-tools \
libqrencode-dev
- name: Build Connections
run: |
bazel build \
--@com_google_protobuf//bazel/toolchains:prefer_prebuilt_protoc=true \
--copt='-DGITHUB_BUILD' \
//connections:core
# - name: Build Presence
# run: |
# bazel build \
# --check_visibility=false \
# --spawn_strategy=standalone \
# --cxxopt=-std=c++20 \
# --host_cxxopt=-std=c++20 \
# --@com_google_protobuf//bazel/toolchains:prefer_prebuilt_protoc=true \
# --copt='-DGITHUB_BUILD' \
# --copt='-fvisibility=hidden' \
# --cxxopt='-fvisibility-inlines-hidden' \
# //presence
- name: Build Nearby Sharing Linux
run: |
bazel build \
--@com_google_protobuf//bazel/toolchains:prefer_prebuilt_protoc=true \
--copt='-DGITHUB_BUILD' \
//sharing/linux:nearby_sharing_cli
#build-rust-linux:
# name: Build Rust on Linux
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v6
# with:
# submodules: recursive
# - name: Build FPP
# run: cargo build --manifest-path presence/fpp/fpp/Cargo.toml