-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use host toolchain on windows chore: try again chore: update rules_go to pick up bazel-contrib/rules_go#4050 use mingw-gcc on windows setupgcc llvm windows latest build try to build python smoke revert most cache smoke test revert test release make python conditional checkout repo chore: fmt chore: restore bazeliskrc chore: keep
- Loading branch information
Showing
7 changed files
with
151 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: build | ||
on: | ||
# push: | ||
# branches: ['main'] | ||
# pull_request: | ||
workflow_call: | ||
outputs: | ||
windows: | ||
description: 'Windows binaries' | ||
value: ${{jobs.build_windows.outputs.artifact}} | ||
linux: | ||
description: 'Linux and MacOS binaries' | ||
value: ${{jobs.build.outputs.artifact}} | ||
jobs: | ||
build: | ||
name: darwin and linux | ||
runs-on: ubuntu-latest | ||
outputs: | ||
artifact: ${{steps.upload.outputs.artifact-url}} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: | | ||
bazel run --config=release //release -- /tmp/aspect/release | ||
- uses: actions/upload-artifact@v4 | ||
id: upload | ||
with: | ||
name: linux | ||
retention-days: 1 | ||
path: /tmp/aspect/release | ||
# Cross-compiling to Windows is too hard. Just build on a windows runner instead. | ||
build_windows: | ||
name: windows | ||
runs-on: windows-2022 | ||
outputs: | ||
artifact: ${{steps.upload.outputs.artifact-url}} | ||
env: | ||
USE_BAZEL_VERSION: 7.2.1 | ||
BAZELISK_BASE_URL: https://github.com/bazelbuild/bazel/releases/download | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: bazel-contrib/setup-bazel@0.9.0 | ||
with: | ||
# Avoid downloading Bazel every time. | ||
bazelisk-cache: true | ||
# Store build cache per workflow. | ||
disk-cache: ${{ github.workflow }} | ||
# Share repository cache between workflows. | ||
repository-cache: true | ||
# Bootstrap: the first time we release for windows, we don't have a windows version of Aspect CLI to build with | ||
# So use environment variables to defeat the .bazeliskrc file. | ||
- run: bazel build //release:aspect_windows_amd64 | ||
- run: cp $(bazel cquery //release:aspect_windows_amd64 --output=files) aspect_windows_amd64.exe | ||
- name: smoke test | ||
run: ./aspect_windows_amd64.exe --help | ||
- uses: actions/upload-artifact@v4 | ||
id: upload | ||
with: | ||
name: windows | ||
retention-days: 1 | ||
path: aspect_windows_amd64.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,32 @@ | ||
name: Release | ||
on: | ||
pull_request: | ||
push: | ||
tags: | ||
- '202*.*.*' | ||
jobs: | ||
build: | ||
build_all: | ||
uses: ./.github/workflows/build.yaml | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: build_all | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Build release artifacts | ||
run: | | ||
if [ -n "$(git status --porcelain)" ]; then | ||
>&2 echo "ERROR: the git state is not clean, aborting build..." | ||
exit 1 | ||
fi | ||
rm -rf /tmp/aspect/release | ||
bazel run --config=release //release -- /tmp/aspect/release | ||
if /tmp/aspect/release/aspect-linux_amd64 version | grep '(with local changes)'; then | ||
>&2 echo "ERROR: the release contained changes in the git state and the release will not be produced" | ||
exit 1 | ||
fi | ||
merge-multiple: true | ||
- run: shasum -a 256 aspect* > SHA256.txt | ||
- name: Prepare workspace snippet | ||
run: .github/workflows/install_snippet.sh > release_notes.txt | ||
- name: Create GitHub draft release and upload artifacts | ||
uses: softprops/action-gh-release@v1 | ||
- run: ls -alF . | ||
# Disabled during testing | ||
- if: false | ||
name: Create GitHub draft release and upload artifacts | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
# Use GH feature to populate the changelog automatically | ||
generate_release_notes: true | ||
body_path: release_notes.txt | ||
files: /tmp/aspect/release/* | ||
files: | | ||
aspect* | ||
SHA256.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.