From 6495be21ec6ef1ba627b0e21bc861aadfc7aee37 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Mon, 6 May 2024 00:07:27 -0400 Subject: [PATCH] Try to change ci --- .bazelrc-java | 6 ++-- .github/workflows/build.yml | 72 +++++++++++++++++++++++-------------- tests/.bazelrc-java | 6 ++-- 3 files changed, 54 insertions(+), 30 deletions(-) diff --git a/.bazelrc-java b/.bazelrc-java index bc63d58..b73ff5c 100644 --- a/.bazelrc-java +++ b/.bazelrc-java @@ -1,5 +1,7 @@ # build --javacopt=-Werror build --javacopt=-Xlint:all,-processing -common --java_language_version=17 -common --java_runtime_version=roboriojdk_17 +build --java_language_version=17 +build --java_runtime_version=roboriojdk_17 +build --tool_java_language_version=11 +build --tool_java_runtime_version=remotejdk_11 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb24a37..dd2c33a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,16 +12,16 @@ jobs: matrix: include: # Build non-bzlmod, native - - { name: "windows - native", os: windows-2022, command: "test", config: "--noenable_bzlmod --config=windows", bazel_options: "--output_user_root=C:\\bazelroot", } - - { name: "windows arm - native", os: windows-2022, command: "build", config: "--noenable_bzlmod --config=windows_arm", bazel_options: "--output_user_root=C:\\bazelroot", } - - { name: "ubuntu - native", os: ubuntu-22.04, command: "test", config: "--noenable_bzlmod --config=linux", bazel_options: "", } - - { name: "macos - native", os: macos-12, command: "test", config: "--noenable_bzlmod --config=macos", bazel_options: "", } + - { name: "windows - native", os: windows-2022, java_arch: "x64", command: "test", config: "--noenable_bzlmod --config=windows", bazel_options: "--output_user_root=C:\\bazelroot", } + - { name: "windows arm - native", os: windows-2022, java_arch: "x64", command: "build", config: "--noenable_bzlmod --config=windows_arm", bazel_options: "--output_user_root=C:\\bazelroot", } + - { name: "ubuntu - native", os: ubuntu-22.04, java_arch: "x64", command: "test", config: "--noenable_bzlmod --config=linux", bazel_options: "", } + - { name: "macos - native", os: macos-12, java_arch: "aarch64", command: "test", config: "--noenable_bzlmod --config=macos", bazel_options: "", } # Build bzlmod, native - - { name: "windows - bzlmod native", os: windows-2022, command: "test", config: "--enable_bzlmod --config=windows", bazel_options: "--output_user_root=C:\\bazelroot", } - - { name: "windows arm - bzlmod native", os: windows-2022, command: "build", config: "--enable_bzlmod --config=windows_arm", bazel_options: "--output_user_root=C:\\bazelroot", } - - { name: "ubuntu - bzlmod native", os: ubuntu-22.04, command: "test", config: "--enable_bzlmod --config=linux", bazel_options: "", } - - { name: "macos - bzlmod native", os: macos-12, command: "test", config: "--enable_bzlmod --config=macos", bazel_options: "", } + - { name: "windows - bzlmod native", os: windows-2022, java_arch: "x64", command: "test", config: "--enable_bzlmod --config=windows", bazel_options: "--output_user_root=C:\\bazelroot", } + - { name: "windows arm - bzlmod native", os: windows-2022, java_arch: "x64", command: "build", config: "--enable_bzlmod --config=windows_arm", bazel_options: "--output_user_root=C:\\bazelroot", } + - { name: "ubuntu - bzlmod native", os: ubuntu-22.04, java_arch: "x64", command: "test", config: "--enable_bzlmod --config=linux", bazel_options: "", } + - { name: "macos - bzlmod native", os: macos-12, java_arch: "aarch64", command: "test", config: "--enable_bzlmod --config=macos", bazel_options: "", } name: "Build - ${{ matrix.name }}" runs-on: ${{ matrix.os }} @@ -29,6 +29,11 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: { python-version: '3.11' } + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 17 + architecture: ${{ matrix.java_arch }} - run: bazel ${{ matrix.bazel_options }} build -k ${{ matrix.config }} --config=remote @rules_bzlmodrio_jdk//... working-directory: tests - name: Build and allow failure # TODO Sometimes symlinks don't get created correctly the first time around @@ -45,20 +50,25 @@ jobs: matrix: include: # Build non-bzlmod, roborio - - { name: "windows - roborio", os: windows-2022, command: "build", config: "--noenable_bzlmod --config=roborio", bazel_options: "--output_user_root=C:\\bazelroot", } - - { name: "ubuntu - roborio", os: ubuntu-22.04, command: "build", config: "--noenable_bzlmod --config=roborio", bazel_options: "", } - - { name: "macos - roborio", os: macos-12, command: "build", config: "--noenable_bzlmod --config=roborio", bazel_options: "", } + - { name: "windows - roborio", os: windows-2022, java_arch: "x64", command: "build", config: "--noenable_bzlmod --config=roborio", bazel_options: "--output_user_root=C:\\bazelroot", } + - { name: "ubuntu - roborio", os: ubuntu-22.04, java_arch: "x64", command: "build", config: "--noenable_bzlmod --config=roborio", bazel_options: "", } + - { name: "macos - roborio", os: macos-12, java_arch: "aarch64", command: "build", config: "--noenable_bzlmod --config=roborio", bazel_options: "", } # Build bzlmod, roborio - # - { name: "windows - bzlmod roborio", os: windows-2022, command: "build", config: "--enable_bzlmod --config=roborio", bazel_options: "--output_user_root=C:\\bazelroot", } - - { name: "ubuntu - bzlmod roborio", os: ubuntu-22.04, command: "build", config: "--enable_bzlmod --config=roborio", bazel_options: "", } - - { name: "macos - bzlmod roborio", os: macos-12, command: "build", config: "--enable_bzlmod --config=roborio", bazel_options: "", } + # - { name: "windows - bzlmod roborio", os: windows-2022, java_arch: "x64", command: "build", config: "--enable_bzlmod --config=roborio", bazel_options: "--output_user_root=C:\\bazelroot", } + - { name: "ubuntu - bzlmod roborio", os: ubuntu-22.04, java_arch: "x64", command: "build", config: "--enable_bzlmod --config=roborio", bazel_options: "", } + - { name: "macos - bzlmod roborio", os: macos-12, java_arch: "aarch64", command: "build", config: "--enable_bzlmod --config=roborio", bazel_options: "", } name: "Build - ${{ matrix.name }}" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: { python-version: '3.11' } + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 17 + architecture: ${{ matrix.java_arch }} - name: Build and allow failure # TODO Sometimes symlinks don't get created correctly the first time around run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=remote || true working-directory: tests @@ -72,20 +82,25 @@ jobs: matrix: include: # Build non-bzlmod, bullseye32 - - { name: "windows - bullseye32", os: windows-2022, command: "build", config: "--noenable_bzlmod --config=bullseye32", bazel_options: "--output_user_root=C:\\bazelroot", } - - { name: "ubuntu - bullseye32", os: ubuntu-22.04, command: "build", config: "--noenable_bzlmod --config=bullseye32", bazel_options: "", } - - { name: "macos - bullseye32", os: macos-12, command: "build", config: "--noenable_bzlmod --config=bullseye32", bazel_options: "", } + - { name: "windows - bullseye32", os: windows-2022, java_arch: "x64", command: "build", config: "--noenable_bzlmod --config=bullseye32", bazel_options: "--output_user_root=C:\\bazelroot", } + - { name: "ubuntu - bullseye32", os: ubuntu-22.04, java_arch: "x64", command: "build", config: "--noenable_bzlmod --config=bullseye32", bazel_options: "", } + - { name: "macos - bullseye32", os: macos-12, java_arch: "aarch64", command: "build", config: "--noenable_bzlmod --config=bullseye32", bazel_options: "", } # Build bzlmod, bullseye32 - - { name: "windows - bzlmod bullseye32", os: windows-2022, command: "build", config: "--enable_bzlmod --config=bullseye32", bazel_options: "--output_user_root=C:\\bazelroot", } - - { name: "ubuntu - bzlmod bullseye32", os: ubuntu-22.04, command: "build", config: "--enable_bzlmod --config=bullseye32", bazel_options: "", } - - { name: "macos - bzlmod bullseye32", os: macos-12, command: "build", config: "--enable_bzlmod --config=bullseye32", bazel_options: "", } + - { name: "windows - bzlmod bullseye32", os: windows-2022, java_arch: "x64", command: "build", config: "--enable_bzlmod --config=bullseye32", bazel_options: "--output_user_root=C:\\bazelroot", } + - { name: "ubuntu - bzlmod bullseye32", os: ubuntu-22.04, java_arch: "x64", command: "build", config: "--enable_bzlmod --config=bullseye32", bazel_options: "", } + - { name: "macos - bzlmod bullseye32", os: macos-12, java_arch: "aarch64", command: "build", config: "--enable_bzlmod --config=bullseye32", bazel_options: "", } name: "Build - ${{ matrix.name }}" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: { python-version: '3.11' } + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 17 + architecture: ${{ matrix.java_arch }} - name: Build and allow failure # TODO Sometimes symlinks don't get created correctly the first time around run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=remote || true working-directory: tests @@ -100,20 +115,25 @@ jobs: matrix: include: # Build non-bzlmod, bullseye32: - - { name: "windows - bullseye64", os: windows-2022, command: "build", config: "--noenable_bzlmod --config=bullseye64", bazel_options: "--output_user_root=C:\\bazelroot", } - - { name: "ubuntu - bullseye64", os: ubuntu-22.04, command: "build", config: "--noenable_bzlmod --config=bullseye64", bazel_options: "", } - - { name: "macos - bullseye64", os: macos-12, command: "build", config: "--noenable_bzlmod --config=bullseye32", bazel_options: "", } + - { name: "windows - bullseye64", os: windows-2022, java_arch: "x64", command: "build", config: "--noenable_bzlmod --config=bullseye64", bazel_options: "--output_user_root=C:\\bazelroot", } + - { name: "ubuntu - bullseye64", os: ubuntu-22.04, java_arch: "x64", command: "build", config: "--noenable_bzlmod --config=bullseye64", bazel_options: "", } + - { name: "macos - bullseye64", os: macos-12, java_arch: "aarch64", command: "build", config: "--noenable_bzlmod --config=bullseye32", bazel_options: "", } # Build bzlmod, bullseye32: - - { name: "windows - bzlmod bullseye64", os: windows-2022, command: "build", config: "--enable_bzlmod --config=bullseye64", bazel_options: "--output_user_root=C:\\bazelroot", } - - { name: "ubuntu - bzlmod bullseye64", os: ubuntu-22.04, command: "build", config: "--enable_bzlmod --config=bullseye64", bazel_options: "", } - - { name: "macos - bzlmod bullseye64", os: macos-12, command: "build", config: "--enable_bzlmod --config=bullseye64", bazel_options: "", } + - { name: "windows - bzlmod bullseye64", os: windows-2022, java_arch: "x64", command: "build", config: "--enable_bzlmod --config=bullseye64", bazel_options: "--output_user_root=C:\\bazelroot", } + - { name: "ubuntu - bzlmod bullseye64", os: ubuntu-22.04, java_arch: "x64", command: "build", config: "--enable_bzlmod --config=bullseye64", bazel_options: "", } + - { name: "macos - bzlmod bullseye64", os: macos-12, java_arch: "aarch64", command: "build", config: "--enable_bzlmod --config=bullseye64", bazel_options: "", } name: "Build - ${{ matrix.name }}" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: { python-version: '3.11' } + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 17 + architecture: ${{ matrix.java_arch }} - name: Build and allow failure # TODO Sometimes symlinks don't get created correctly the first time around run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=remote || true working-directory: tests diff --git a/tests/.bazelrc-java b/tests/.bazelrc-java index bc63d58..b73ff5c 100644 --- a/tests/.bazelrc-java +++ b/tests/.bazelrc-java @@ -1,5 +1,7 @@ # build --javacopt=-Werror build --javacopt=-Xlint:all,-processing -common --java_language_version=17 -common --java_runtime_version=roboriojdk_17 +build --java_language_version=17 +build --java_runtime_version=roboriojdk_17 +build --tool_java_language_version=11 +build --tool_java_runtime_version=remotejdk_11