Skip to content

Update SDK to version 0.11.4 #13

Update SDK to version 0.11.4

Update SDK to version 0.11.4 #13

Workflow file for this run

name: Build and release CLI
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
# Ignore pre-release tags
# https://packaging.python.org/en/latest/specifications/version-specifiers/#public-version-identifiers
- "!v[0-9]+.[0-9]+.[0-9]+a*"
- "!v[0-9]+.[0-9]+.[0-9]+b*"
- "!v[0-9]+.[0-9]+.[0-9]+rc*"
jobs:
determine-pex-platforms:
strategy:
matrix:
include:
- os: macos
image: macos-latest
arch: aarch64
- os: macos
image: macos-13
arch: x86_64
- os: linux
image: ubuntu-20.04
arch: x86_64
- os: linux
image: ubuntu-24.04-arm64
arch: aarch64
name: Determine pex platforms (${{ matrix.os }}/${{ matrix.arch }})
runs-on: ${{ matrix.image }}
steps:
- uses: actions/setup-python@v5
- name: Determine complete_platforms for pex
run: |
python -m venv .venv
.venv/bin/python -m pip install pex
.venv/bin/pex3 interpreter inspect --markers --tags > ${{ matrix.os }}_py310_${{ matrix.arch }}.json
- uses: actions/upload-artifact@v4
with:
name: "${{ matrix.os }}_py310_${{ matrix.arch }}"
path: "${{ matrix.os }}_py310_${{ matrix.arch }}.json"
overwrite: true
build-bin-artifacts:
name: Build MacOS + Linux binaries
needs: [determine-pex-platforms]
# Ideally `determine-pex-platforms`, `build-bin-artifacts`, and `exercise-artifacts` jobs would be combined.
# But the `scie_binary` target does not appear to work on macOS.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
pattern: .*_py310_*
path: build-support/pex_platforms
merge-multiple: true
- uses: actions/setup-python@v5
# This action bootstraps pants and manages 2-3 GHA caches.
# See: github.com/pantsbuild/actions/tree/main/init-pants/
- uses: pantsbuild/actions/init-pants@v9
- name: Conformance
run: |
pants check ::
- name: Create binaries
run: |
pants package :roboto
pants package :roboto-agent
- name: Package Arm64 .deb
run: |
VERSION="$(./dist/roboto-linux-x86_64 --version --suppress-upgrade-check)"
mkdir -p roboto_arm_deb/DEBIAN
echo "Package: roboto" > roboto_arm_deb/DEBIAN/control
echo "Version: ${VERSION}" >> roboto_arm_deb/DEBIAN/control
echo "Architecture: arm64" >> roboto_arm_deb/DEBIAN/control
echo "Maintainer: Roboto AI <[email protected]>" >> roboto_arm_deb/DEBIAN/control
echo "Description: Roboto CLI and Agent" >> roboto_arm_deb/DEBIAN/control
mkdir -p roboto_arm_deb/usr/bin
cp ./dist/roboto-linux-aarch64 roboto_arm_deb/usr/bin/roboto
cp ./dist/roboto-agent-linux-aarch64 roboto_arm_deb/usr/bin/roboto-agent
dpkg-deb --build roboto_arm_deb dist/roboto-linux-aarch64_${VERSION}.deb
- name: Package x86_64 .deb
run: |
VERSION="$(./dist/roboto-linux-x86_64 --version --suppress-upgrade-check)"
mkdir -p roboto_x86_64_deb/DEBIAN
echo "Package: roboto" > roboto_x86_64_deb/DEBIAN/control
echo "Version: ${VERSION}" >> roboto_x86_64_deb/DEBIAN/control
echo "Architecture: amd64" >> roboto_x86_64_deb/DEBIAN/control
echo "Maintainer: Roboto AI <[email protected]>" >> roboto_x86_64_deb/DEBIAN/control
echo "Description: Roboto CLI and Agent" >> roboto_x86_64_deb/DEBIAN/control
mkdir -p roboto_x86_64_deb/usr/bin
cp ./dist/roboto-linux-x86_64 roboto_x86_64_deb/usr/bin/roboto
cp ./dist/roboto-agent-linux-x86_64 roboto_x86_64_deb/usr/bin/roboto-agent
dpkg-deb --build roboto_x86_64_deb dist/roboto-linux-x86_64_${VERSION}.deb
- uses: actions/upload-artifact@v4
with:
name: bin-artifacts
path: dist/
overwrite: true
exercise-artifacts:
needs: [build-bin-artifacts]
strategy:
matrix:
include:
- image: macos-latest
os: macos
arch: aarch64
- image: macos-13
os: macos
arch: x86_64
- image: ubuntu-20.04
os: linux
arch: x86_64
- image: ubuntu-24.04-arm64
os: linux
arch: aarch64
name: Exercise (${{ matrix.os }}/${{ matrix.arch }}) Binaries
runs-on: ${{ matrix.image }}
steps:
- uses: actions/download-artifact@v4
with:
name: bin-artifacts
path: dist
- name: Exercise roboto CLI
run: |
chmod +x ./dist/roboto-${{ matrix.os }}-${{ matrix.arch }}
./dist/roboto-${{ matrix.os }}-${{ matrix.arch }} --version --suppress-upgrade-check
- name: Exercise roboto-agent
run: |
chmod +x ./dist/roboto-agent-${{ matrix.os }}-${{ matrix.arch }}
./dist/roboto-agent-${{ matrix.os }}-${{ matrix.arch }} --help
build-and-exercise-windows:
name: Build (windows/x86_64) binaries
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
- name: Install deps
run: |
pip install .
pip install pyinstaller
- name: Create binaries
run: |
python -m PyInstaller --name roboto-windows-x86_64 --target-architecture x86_64 --onefile --paths src --collect-data cookiecutter cli_entrypoint.py
python -m PyInstaller --name roboto-agent-windows-x86_64 --target-architecture x86_64 --onefile --paths src agent_entrypoint.py
- name: Exercise roboto CLI
run: ./dist/roboto-windows-x86_64 --version --suppress-upgrade-check
- name: Exercise roboto-agent
run: ./dist/roboto-agent-windows-x86_64 --help
- uses: actions/upload-artifact@v4
with:
name: windows-artifacts
path: dist/
overwrite: true
release:
needs: [exercise-artifacts, build-bin-artifacts, build-and-exercise-windows]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
path: dist
- name: List artifacts
run: ls -R dist
- name: Release
uses: softprops/action-gh-release@v2
with:
files: dist/roboto-*
make_latest: true