Skip to content

gui: Add July 20 special date #2066

gui: Add July 20 special date

gui: Add July 20 special date #2066

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
paths:
- "Source/**"
- "Testing/**"
- MODULE.bazel
- BUILD
- helper.bzl
- non_module_deps.bzl
- .github/**
- .bazelrc
jobs:
lint:
name: "Lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6
- name: Get clang-format-19
run: sudo apt-get install --no-install-recommends -y clang-format-19
- name: Set clang-format-19 as default
run: |
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-19 100
sudo update-alternatives --set clang-format /usr/bin/clang-format-19
clang-format --version
- name: Run linters
run: ./Testing/lint.sh
check_localization:
name: "Check Localization"
runs-on: macos-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6
- name: Check missing localization strings
run: |
./Testing/localization.py
if [[ -n "$(git diff)" ]]; then
git diff
echo "Base localization has not been updated. Please run:"
echo " ./Testing/localization.py"
echo "and commit any changes it makes."
exit 1 # return an error if localization.py made changes
fi
check-test-suites:
name: "Check Test Suites"
runs-on: macos-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@083175551ceeceebc757ebee2127fde78840ca77 # ratchet:bazel-contrib/setup-bazel@0.18.0
with:
bazelisk-cache: true
- name: Check all unit tests are in test suites
run: ./Testing/check_test_suites.sh
build-and-test:
name: "Build and Test"
needs: lint
permissions:
contents: read
id-token: write
strategy:
fail-fast: false
matrix:
os: [macos-14, macos-15, macos-26]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6
- name: Auth to GCP
if: ${{ !github.event.pull_request.head.repo.fork }} # This step will only run if it's NOT a fork
continue-on-error: true
id: auth
uses: "google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093" # ratchet:google-github-actions/auth@v3
with:
workload_identity_provider: "projects/131531281042/locations/global/workloadIdentityPools/github/providers/github"
project_id: "santa-build-cache"
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@083175551ceeceebc757ebee2127fde78840ca77 # ratchet:bazel-contrib/setup-bazel@0.18.0
with:
bazelisk-cache: true
disk-cache: ${{ matrix.os }}
repository-cache: true
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # ratchet:maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Build
run: |
if [[ "${{ steps.auth.outcome }}" == "success" ]]; then
bazel build \
--verbose_failures \
--sandbox_debug \
--apple_generate_dsym \
--define=SANTA_BUILD_TYPE=adhoc \
--remote_cache=https://storage.googleapis.com/santa-build-cache \
--google_default_credentials \
//Source/gui:Santa
else
bazel build \
--verbose_failures \
--sandbox_debug \
--apple_generate_dsym \
--define=SANTA_BUILD_TYPE=adhoc \
//Source/gui:Santa
fi
- name: Test
run: |
if [[ "${{ steps.auth.outcome }}" == "success" ]]; then
bazel test \
--test_output=errors \
--verbose_failures \
--sandbox_debug \
--define=SANTA_BUILD_TYPE=adhoc \
--remote_cache=https://storage.googleapis.com/santa-build-cache \
--google_default_credentials \
:unit_tests
else
bazel test \
--test_output=errors \
--verbose_failures \
--sandbox_debug \
--define=SANTA_BUILD_TYPE=adhoc \
:unit_tests
fi