ci: fix PEP668 pip, linux-only docker, mac via host runner, windows pends on GamingPC host runner
This commit is contained in:
@@ -6,38 +6,46 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-linux:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: ubuntu-latest
|
|
||||||
artifact: NexusAgent-linux
|
|
||||||
- os: windows-latest
|
|
||||||
artifact: NexusAgent-windows
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install PyInstaller
|
- name: Install PyInstaller
|
||||||
run: pip install pyinstaller
|
run: pip install --break-system-packages pyinstaller || pip install pyinstaller
|
||||||
- name: Bake token + build (unix)
|
- name: Bake token + build
|
||||||
if: matrix.os != 'windows-latest'
|
|
||||||
shell: bash
|
|
||||||
env:
|
env:
|
||||||
AGENT_TOKEN: ${{ secrets.NEXUS_AGENT_TOKEN }}
|
AGENT_TOKEN: ${{ secrets.NEXUS_AGENT_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
sed "s/__AGENT_TOKEN__/$AGENT_TOKEN/" agents/agent.py > baked.py
|
sed "s/__AGENT_TOKEN__/$AGENT_TOKEN/" agents/agent.py > baked.py
|
||||||
pyinstaller --onefile --name ${{ matrix.artifact }} baked.py
|
pyinstaller --onefile --name NexusAgent-linux baked.py
|
||||||
- name: Bake token + build (windows)
|
- uses: actions/upload-artifact@v4
|
||||||
if: matrix.os == 'windows-latest'
|
with: {name: NexusAgent-linux, path: dist/}
|
||||||
|
|
||||||
|
build-macos:
|
||||||
|
runs-on: macos-latest # host runner on drjones' MacBook
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: pip3 install --user pyinstaller || pip3 install --break-system-packages pyinstaller
|
||||||
|
- name: Bake token + build
|
||||||
|
env:
|
||||||
|
AGENT_TOKEN: ${{ secrets.NEXUS_AGENT_TOKEN }}
|
||||||
|
run: |
|
||||||
|
sed "s/__AGENT_TOKEN__/$AGENT_TOKEN/" agents/agent.py > baked.py
|
||||||
|
pyinstaller --onefile --name NexusAgent-macos baked.py
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with: {name: NexusAgent-macos, path: dist/}
|
||||||
|
|
||||||
|
build-windows:
|
||||||
|
runs-on: windows-latest # host runner on GamingPC — pends until that host registers
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: pip install pyinstaller
|
||||||
|
- name: Bake token + build
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
env:
|
env:
|
||||||
AGENT_TOKEN: ${{ secrets.NEXUS_AGENT_TOKEN }}
|
AGENT_TOKEN: ${{ secrets.NEXUS_AGENT_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
(Get-Content agents/agent.py) -replace '__AGENT_TOKEN__', $env:AGENT_TOKEN | Set-Content baked.py
|
(Get-Content agents/agent.py) -replace '__AGENT_TOKEN__', $env:AGENT_TOKEN | Set-Content baked.py
|
||||||
pyinstaller --onefile --name ${{ matrix.artifact }} baked.py
|
pyinstaller --onefile --name NexusAgent-windows baked.py
|
||||||
- name: Upload artifact
|
- uses: actions/upload-artifact@v4
|
||||||
uses: actions/upload-artifact@v4
|
with: {name: NexusAgent-windows, path: dist/}
|
||||||
with:
|
|
||||||
name: ${{ matrix.artifact }}
|
|
||||||
path: dist/
|
|
||||||
Thu Oct 1 16:11:20 PDT 2026
|
|
||||||
|
|||||||
Reference in New Issue
Block a user