Skip to content

Commit

Permalink
chore: sync with ecsact_common
Browse files Browse the repository at this point in the history
  • Loading branch information
seaubot committed Sep 13, 2023
1 parent c6534d7 commit 2cb2dbf
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 39 deletions.
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6.3.2
15 changes: 15 additions & 0 deletions .github/workflows/bzlmod-archive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This file is maintained by ecsact-dev/ecsact_common
# If changes are required please make them there

name: bzlmod archive

on:
release:
types: [published]

jobs:
bzlmod-archive:
uses: ecsact-dev/bazel_registry/.github/workflows/bzlmod-archive.yml@main
secrets: inherit
permissions:
contents: write
53 changes: 18 additions & 35 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,48 @@
name: CI
# This file is maintained by ecsact-dev/ecsact_common
# If changes are required please make them there

name: main

on:
push:
branches:
- "**"

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: jidicula/[email protected]
with: { clang-format-version: "15" }
build-windows:
runs-on: windows-latest
steps:
- uses: actions/cache@v3
with:
path: |
/Users/runneradmin/AppData/Local/bazelisk
/Users/runneradmin/.cache/bazel-disk-cache
key: ${{runner.os}}-bazel-cache
- uses: actions/checkout@v3
- run: bazel build --config=ci //...
with: { clang-format-version: "16" }

test-windows:
runs-on: windows-latest
needs: build-windows
steps:
- uses: actions/cache@v3
with:
path: |
/Users/runneradmin/AppData/Local/bazelisk
/Users/runneradmin/.cache/bazel-disk-cache
key: ${{runner.os}}-bazel-cache
- uses: actions/checkout@v3
- run: bazel test --config=ci //...
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v3
with:
path: |
~/.cache/bazelisk
~/.cache/bazel-disk-cache
key: ${{runner.os}}-bazel-cache
- uses: actions/checkout@v3
- run: bazel build --config=ci --config=no-warnings //...
- uses: actions/checkout@v4
- run: bazelisk build --config=ci //...
- if: ${{ hashfiles('test/MODULE.bazel') == '' }}
run: bazelisk test --config=ci ...
working-directory: test

test-linux:
runs-on: ubuntu-latest
needs: build-linux
steps:
- uses: actions/cache@v3
with:
path: |
~/.cache/bazelisk
~/.cache/bazel-disk-cache
key: ${{runner.os}}-bazel-cache
- uses: actions/checkout@v3
- run: bazel test --config=ci --config=no-warnings //...
- uses: actions/checkout@v4
- run: bazelisk build --config=ci //...
- if: ${{ hashfiles('test/MODULE.bazel') == '' }}
run: bazelisk test --config=ci ...
working-directory: test
19 changes: 19 additions & 0 deletions bazel/common.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
startup --windows_enable_symlinks
common --enable_bzlmod
build --enable_platform_specific_config
build --incompatible_use_platforms_repo_for_constraints
build --incompatible_enable_cc_toolchain_resolution
build --incompatible_strict_action_env
build --enable_runfiles
build --noincompatible_remove_rule_name_parameter
query --noincompatible_remove_rule_name_parameter

# Temporary until https://github.com/grailbio/bazel-toolchain/pull/198 is merged
build:linux --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux

common:ci --announce_rc
common:ci --verbose_failures
common:ci --keep_going
common:ci --disk_cache=~/.cache/bazel-disk-cache

try-import %workspace%/user.bazelrc
16 changes: 13 additions & 3 deletions bazel/copts.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
copts = select({
"@bazel_tools//tools/cpp:msvc": ["/std:c++latest"],
"//conditions:default": ["-std=c++20", "-Werror"],
load("@bazel_skylib//lib:selects.bzl", "selects")

# Ecsact repositories currently only support clang and cl
copts = selects.with_or({
("@rules_cc//cc/compiler:clang"): [
"-std=c++2b",
"-fexperimental-library",
],
("@rules_cc//cc/compiler:msvc-cl", "@rules_cc//cc/compiler:clang-cl"): [
"/std:c++latest",
"/permissive-",
"/Zc:preprocessor",
],
})
2 changes: 1 addition & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"extends": [
"github>ecsact-dev/renovate-config"
]
}
}

0 comments on commit 2cb2dbf

Please sign in to comment.