Skip to content

ci: update standalone-ci #13

ci: update standalone-ci

ci: update standalone-ci #13

Workflow file for this run

# runs python scripts/pack.py to create a desktop build
# the build is at packaging/dist/latest/xxx.zip
# the build is uploaded to s3 with shallwefootball/s3-upload-action@master
name: Standalone CI
on:
push:
branches: '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
# checkout with submodules
- name: Get token from Github App
uses: actions/create-github-app-token@v1
id: app_token
with:
app-id: ${{ secrets.CI_APP_ID }}
private-key: ${{ secrets.CI_APP_PEM }}
# owner is required, otherwise the creds will fail the checkout step
owner: ${{ github.repository_owner }}
- name: Checkout from GitHub
uses: actions/checkout@v4
with:
submodules: true
token: ${{ steps.app_token.outputs.token }}
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: |
pip install -r packaging/pack_requirements.txt
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install npm dependencies
run: |
cd frontend && npm install && cd ..
cd submodules/topicsync-client && npm install && cd ../..
cd submodules/objectsync-client && npm install && cd ../..
- name: Decode pyarmor registration file
env:
REGFILE: ${{ secrets.PYARMOR_REGFILE }}
run: |
echo $REGFILE | base64 -d > ~/.pyarmor-regfile-4553.zip
- name: Register pyarmor
run: |
pyarmor reg ~/.pyarmor-regfile-4553.zip && rm ~/.pyarmor-regfile-4553.zip
- name: Run pack.py with --name 6 digits of commit hash
run: python scripts/pack.py --platform linux.x86_64 --name $(echo $GITHUB_SHA | cut -c1-6) --folder_name build
- name: Upload artifact for testing
uses: actions/upload-artifact@v2
with:
name: standalone
path: packaging/dist/build/
test:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: standalone
path: packaging/dist/build
- name: Unzip artifact
run: unzip packaging/dist/build/*.zip -d packaging/dist/build
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Cd into packaging/dist/build/xxx
run: cd packaging/dist/build && cd $(ls -d */|head -n 1)
- name: Install Grapycal
run: python install.py
- name: Run Grapycal for 20 seconds
run: python main.py &
- name: Wait for 20 seconds
run: sleep 20
- name: Check if Grapycal is running
run: ps aux | grep main.py | grep -v grep || exit 1
# upload:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Download build
# run: |
# mkdir -p packaging/dist/latest
# wget -O packaging/dist/latest/$(echo $GITHUB_SHA | cut -c1-6).zip