Mra/feat launcher #23
Workflow file for this run
This file contains hidden or 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
| # Full workspace install (clone + Docker image + rosdep + colcon + yarn) plus a | |
| # non-interactive launch smoke test, on both x86_64 and ARM64 GitHub-hosted runners. | |
| # | |
| # - DEV=false -> install.sh uses `url_https` from config/repos.json (sub-repos are public). | |
| # - CI=true -> install.sh skips the host `xhost` check (no GUI on runners). | |
| # - variant=arm runs on `ubuntu-24.04-arm` with `./install.sh --arm`; the built image | |
| # is then verified to be linux/arm64 (linux/amd64 for the default variant). | |
| # - The launch smoke test uses `./launch_lucy.sh --headless <command>`, which runs a | |
| # single command inside the container (no control panel, no auto Gazebo/RViz). | |
| name: Install, Launch & Release | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [master, dev] | |
| tags: | |
| - 'v*' # Run on version tags like v1.0, v2.3.4 | |
| pull_request: | |
| branches: [master, dev] | |
| permissions: | |
| contents: read | |
| jobs: | |
| install-and-launch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.variant }} | |
| cancel-in-progress: true | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 120 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - variant: default | |
| runner: ubuntu-latest | |
| use_arm_install: false | |
| expected_arch: linux/amd64 | |
| - variant: arm | |
| runner: ubuntu-24.04-arm | |
| use_arm_install: true | |
| expected_arch: linux/arm64 | |
| env: | |
| DEV: "false" | |
| CI: "true" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Make sure no committed/local .env can flip DEV back to true at install time. | |
| - name: Drop workspace .env if present | |
| run: rm -f .env .env.local || true | |
| - name: Install (clone + Docker image + rosdep + colcon + yarn) | |
| run: | | |
| chmod +x install.sh launch_lucy.sh | |
| if [ "${{ matrix.use_arm_install }}" = true ]; then | |
| ./install.sh --arm | |
| else | |
| ./install.sh | |
| fi | |
| - name: Verify Lucy image architecture | |
| run: | | |
| osarch=$(docker image inspect lucy_ros2:humble --format '{{.Os}}/{{.Architecture}}') | |
| echo "lucy_ros2:humble -> ${osarch}" | |
| if [ "${osarch}" != "${{ matrix.expected_arch }}" ]; then | |
| echo "::error::Expected ${{ matrix.expected_arch }} after ./install.sh on ${{ matrix.runner }}, got ${osarch}" | |
| exit 1 | |
| fi | |
| # Single command in the container -> bypasses the control-panel / Gazebo / RViz auto-launch. | |
| - name: Launch smoke test (headless, no TTY) | |
| run: ./launch_lucy.sh --headless ros2 doctor --report | |
| build-and-release-windows-exe: | |
| name: Build and Release Windows Executable | |
| # Only run this job when a new tag is pushed | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: windows-latest | |
| needs: install-and-launch | |
| permissions: | |
| contents: write # Required to create a release and upload assets | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Install PyInstaller | |
| run: pip install pyinstaller | |
| - name: Build the executable | |
| run: pyinstaller --onefile --name Lucy windows/Lucy.py | |
| - name: Create Release and Upload Asset | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/Lucy.exe | |
| # This creates a draft release. Remove `draft: true` to publish it automatically. | |
| draft: true |