Skip to content

PKG: make sure that metapensiero/__init__.py is present #2

PKG: make sure that metapensiero/__init__.py is present

PKG: make sure that metapensiero/__init__.py is present #2

Workflow file for this run

name: build
on:
workflow_dispatch: # manual
pull_request:
branches: [ build-standalone ]
schedule:
- cron: '0 0 * * 5'
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
indygreg-release: ["20230507"] # see https://github.com/indygreg/python-build-standalone/releases
python-version: ["3.10.11"]
steps:
- uses: actions/checkout@master
- name: Install MacOS depends (Homebrew)
if: runner.os == 'Darwin'
run: |
brew update --preinstall
brew install glfw lame libevent
brew install labstreaminglayer/tap/lsl
- name: Unpack portable Python distro
run: |
# e.g. https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.10.11+20230507-aarch64-apple-darwin-pgo-full.tar.zst
echo "Building on ${{ runner.os }}"
if [ "${{ runner.os }}" == "Windows" ]
then
arch="x86_64-pc-windows-msvc-shared"
shasum=sha256sum
elif [ "${{ runner.os }}" == "Linux" ]
then
arch="x86_64-unknown-linux"
elif [ "${{ runner.os }}" == "macOS" ]
then
arch="x86_64-apple-darwin"
else
echo "unknown OS ${{ runner.os }}"
fi
fname="cpython-${{ matrix.python-version }}+${{ matrix.indygreg-release }}-$arch-install_only.tar.gz"
indygreg="https://github.com/indygreg/python-build-standalone/releases/download/${{ matrix.indygreg-release }}"
url="$indygreg/$fname"
echo $url
# fetch the files
curl --location "$url" -o python.tar.gz
curl --location "$url.sha256" -o shafile
# check checksum first
python3 .github/workflows/checksum.py python.tar.gz shafile sha256
# then unzip and move
tar -xf python.tar.gz
# move to our preferred path
mv python py
# clean up unecess files
rm python.tar.gz shafile
- name: Install dependencies
run: |
# NB pip comes in indygreg but not in python.org
# for python.org do .venv/bin/python get-pip.py
shopt -s expand_aliases # allow aliases in bash
if [ "${{ runner.os }}" == "Windows" ]
then
alias mypip='py/python -m pip'
else
alias mypip='py/bin/python3 -m pip'
fi
mypip install -U pip
mypip install -U wheel
mypip install ".[building]" # install self with building extras
mypip install ".[tests]" # install self with tests extras
- name: Build binary (Windows)
if: runner.os == 'Windows'
run:
bash ./building/buildWinDistributions.sh

Check failure on line 91 in .github/workflows/build.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yaml

Invalid workflow file

You have an error in your yaml syntax on line 91
- name: Build binary (MacOS)
if: runner.os == 'macOS'
env:
CODESIGN_PASSWORD: ${{ secrets.OST_APPLE_PWORD }}
CODESIGN_ID: ${{ secrets.OST_APPLE_ID }}
run:
touch py/lib/python3.10/site-packages/metapensiero/__init__.py # create missing file
sh ./building/buildAppMacOS.sh $CODESIGN_ID $CODESIGN_PASSWORD
- name: Upload builds with googleapi
env:
DOGFOOD_KEY: ${{ secrets.PSYCHOPY_BUILD_KEY }}
NIGHTLY_FOLDER: ${{ secrets.NIGHTLY_FOLDER }}
if: ${{ env.gdrive_key != '' }}
run: |
# NB this is using python but after we build so won't include?
python3 -m pip install googleapi
if [ "${{ runner.os }}" == "Windows" ]
then
echo "uploading windows build"
python3 .github/workflows/gdrive.py $DOGFOOD_KEY --folder_id=$NIGHTLY_FOLDER --filepath=dist --glob_pattern='**/*.exe' --suffix='date'
else
echo "uploading macos build"
# python3 .github/workflows/gdrive.py $DOGFOOD_KEY --folder_id=$NIGHTLY_FOLDER --filepath=dist --glob_pattern='**/*.zip' --suffix='date'
python3 .github/workflows/gdrive.py $DOGFOOD_KEY --folder_id=NIGHTLY_FOLDER --filepath=dist --glob_pattern='**/*.dmg' --suffix='date'
fi