mirror of
https://github.com/The-OpenROAD-Project/OpenROAD.git
synced 2026-06-02 01:08:34 +08:00
Avoids "Node.js 20 actions are deprecated." warnings. Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
name: Build on macOS
|
|
on:
|
|
push:
|
|
branches:
|
|
- master # Updated to strictly track master
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
Mac-Build:
|
|
if: github.repository_owner != 'The-OpenROAD-Project-private'
|
|
runs-on: macos-latest
|
|
steps:
|
|
- name: Setup xcode
|
|
uses: maxim-lobanov/setup-xcode@v1
|
|
with:
|
|
xcode-version: latest-stable
|
|
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
submodules: 'recursive'
|
|
|
|
# 1. RESTORE: All jobs (PRs, manual runs, master) get to read the cache
|
|
- name: Restore Bazel Disk Cache
|
|
uses: actions/cache/restore@v5
|
|
with:
|
|
path: ~/.cache/bazel-disk-cache
|
|
key: ${{ runner.os }}-bazel-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-bazel-
|
|
|
|
- name: Install Bazelisk
|
|
run: brew install bazelisk
|
|
|
|
- name: Build OpenROAD
|
|
run: |
|
|
bazelisk build \
|
|
--disk_cache=~/.cache/bazel-disk-cache \
|
|
--experimental_disk_cache_gc_max_size=5G \
|
|
--//:platform=gui //:openroad
|
|
|
|
# 2. SAVE: Only executes if this is a push/merge directly to the master branch
|
|
- name: Save Bazel Disk Cache
|
|
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
|
uses: actions/cache/save@v5
|
|
with:
|
|
path: ~/.cache/bazel-disk-cache
|
|
key: ${{ runner.os }}-bazel-${{ github.sha }} |