Skip to content

Updates templates to use "/U" log path #352

Updates templates to use "/U" log path

Updates templates to use "/U" log path #352

Workflow file for this run

name: Build
on:
push:
release:
types: [published]
jobs:
athena:
name: Build for Athena
runs-on: ubuntu-22.04
steps:
# Job setup & initial build
- name: "Checkout repository"
uses: actions/checkout@v3
- name: "Setup Java"
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "11"
- name: "Build all"
run: bazelisk build --config=athena --verbose_failures ...
- name: "Release: Get version number"
id: get_version
if: github.event_name == 'release'
uses: battila7/get-version-action@v2
- name: "Release: Get release info"
id: get_release_info
if: github.event_name == 'release'
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload vendordep
- name: "Release: Generate vendordep"
if: github.event_name == 'release'
run: bazelisk build --define "publishing_version=${{ steps.get_version.outputs.version-without-v }}" //:vendordep
- name: "Release: Upload vendordep"
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
asset_path: bazel-bin/AdvantageKit.json
asset_name: AdvantageKit.json
asset_content_type: application/json
# Upload example projects
- name: "Release: Generate example projects"
if: github.event_name == 'release'
run: bazelisk build --define "publishing_version=${{ steps.get_version.outputs.version-without-v }}" //example_projects
- name: "Release: Upload example project (skeleton)"
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
asset_path: bazel-bin/example_projects/skeleton.zip
asset_name: AdvantageKit_SkeletonProject.zip
asset_content_type: application/zip
- name: "Release: Upload example project (command)"
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
asset_path: bazel-bin/example_projects/command.zip
asset_name: AdvantageKit_CommandBasedProject.zip
asset_content_type: application/zip
# Upload conduit build
- name: 'Release: Install Dependencies'
if: github.event_name == 'release'
run: pip3 install requests
- name: 'Release: Build "conduit/wpilibio:nativezip"'
if: github.event_name == 'release'
run: bazelisk build --config=athena --define "publishing_version=${{ steps.get_version.outputs.version-without-v }}" //conduit/wpilibio:nativezip
- name: 'Release: Upload "conduit/wpilibio:nativezip"'
if: github.event_name == 'release'
run: python3 build_tools/repo/publish_zip.py --url https://maven.pkg.github.com/Mechanical-Advantage/AdvantageKit --group_id org.littletonrobotics.akit.conduit --artifact_id conduit-wpilibio --version ${{ steps.get_version.outputs.version-without-v }} --classifier linuxathena --file_path bazel-bin/conduit/wpilibio/wpilibio-${{ steps.get_version.outputs.version-without-v }}-linuxathena.zip --username Mechanical-Advantage --access_token ${{ secrets.GITHUB_TOKEN }}
- name: 'Release: Upload "conduit/wpilibio:pom"'
if: github.event_name == 'release'
run: bazelisk run --config=athena --define "maven_repo=https://maven.pkg.github.com/Mechanical-Advantage/AdvantageKit" --define "publishing_version=${{ steps.get_version.outputs.version-without-v }}" //conduit/wpilibio:pom.publish
env:
GITHUB_ACTOR: Mechanical-Advantage
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Upload Java packages
- name: 'Release: Upload "conduit/api"'
if: github.event_name == 'release'
run: bazelisk run --define "maven_repo=https://maven.pkg.github.com/Mechanical-Advantage/AdvantageKit" --define "maven_user=Mechanical-Advantage" --define "maven_password=${{ secrets.GITHUB_TOKEN }}" --define "publishing_version=${{ steps.get_version.outputs.version-without-v }}" //conduit/api:api-export.publish
- name: 'Release: Upload "junction/core"'
if: github.event_name == 'release'
run: bazelisk run --define "maven_repo=https://maven.pkg.github.com/Mechanical-Advantage/AdvantageKit" --define "maven_user=Mechanical-Advantage" --define "maven_password=${{ secrets.GITHUB_TOKEN }}" --define "publishing_version=${{ steps.get_version.outputs.version-without-v }}" //junction/core:core-export.publish
- name: 'Release: Upload "junction/autolog"'
if: github.event_name == 'release'
run: bazelisk run --define "maven_repo=https://maven.pkg.github.com/Mechanical-Advantage/AdvantageKit" --define "maven_user=Mechanical-Advantage" --define "maven_password=${{ secrets.GITHUB_TOKEN }}" --define "publishing_version=${{ steps.get_version.outputs.version-without-v }}" //junction/autolog:autolog-export.publish
- name: 'Release: Upload "junction/shims/wpilib"'
if: github.event_name == 'release'
run: bazelisk run --define "maven_repo=https://maven.pkg.github.com/Mechanical-Advantage/AdvantageKit" --define "maven_user=Mechanical-Advantage" --define "maven_password=${{ secrets.GITHUB_TOKEN }}" --define "publishing_version=${{ steps.get_version.outputs.version-without-v }}" //junction/shims/wpilib:wpilib-export.publish
desktop:
strategy:
matrix:
host:
- { os: macos-latest, displayName: "macOS", classifier: "osxuniversal" }
- { os: ubuntu-22.04, displayName: "Linux", classifier: "linuxx86-64" }
- { os: windows-2019, displayName: "Windows", classifier: "windowsx86-64" }
name: Build for ${{ matrix.host.displayName }}
runs-on: ${{ matrix.host.os }}
steps:
# Job setup & initial build
- name: "Checkout repository"
uses: actions/checkout@v3
- name: "Setup Java"
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "11"
- name: "Build all"
run: bazelisk build --verbose_failures ...
- name: "Test all"
run: bazelisk test ...
- name: "Release: Get version number"
id: get_version
if: github.event_name == 'release'
uses: battila7/get-version-action@v2
# Upload conduit build
- name: 'Release: Install Dependencies'
if: github.event_name == 'release'
run: pip3 install requests
- name: 'Release: Build "conduit/wpilibio:nativezip" for macOS'
if: github.event_name == 'release' && matrix.host.displayName == 'macOS'
run: bazelisk build --define "publishing_version=${{ steps.get_version.outputs.version-without-v }}" //conduit/wpilibio/osxuniversal:nativezip
- name: 'Release: Upload "conduit/wpilibio:nativezip" for macOS'
if: github.event_name == 'release' && matrix.host.displayName == 'macOS'
run: python3 build_tools/repo/publish_zip.py --url https://maven.pkg.github.com/Mechanical-Advantage/AdvantageKit --group_id org.littletonrobotics.akit.conduit --artifact_id conduit-wpilibio --version ${{ steps.get_version.outputs.version-without-v }} --classifier ${{ matrix.host.classifier }} --file_path bazel-bin/conduit/wpilibio/osxuniversal/wpilibio-${{ steps.get_version.outputs.version-without-v }}-${{ matrix.host.classifier }}.zip --username Mechanical-Advantage --access_token ${{ secrets.GITHUB_TOKEN }}
- name: 'Release: Build "conduit/wpilibio:nativezip"'
if: github.event_name == 'release' && matrix.host.displayName != 'macOS'
run: bazelisk build --define "publishing_version=${{ steps.get_version.outputs.version-without-v }}" //conduit/wpilibio:nativezip
- name: 'Release: Upload "conduit/wpilibio:nativezip"'
if: github.event_name == 'release' && matrix.host.displayName != 'macOS'
run: python3 build_tools/repo/publish_zip.py --url https://maven.pkg.github.com/Mechanical-Advantage/AdvantageKit --group_id org.littletonrobotics.akit.conduit --artifact_id conduit-wpilibio --version ${{ steps.get_version.outputs.version-without-v }} --classifier ${{ matrix.host.classifier }} --file_path bazel-bin/conduit/wpilibio/wpilibio-${{ steps.get_version.outputs.version-without-v }}-${{ matrix.host.classifier }}.zip --username Mechanical-Advantage --access_token ${{ secrets.GITHUB_TOKEN }}