Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Linux build after python-appimage release disappeared #722

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/actions/init-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ outputs:
value: ${{steps.vars.outputs.draft}}
manifest:
value: ${{steps.vars.outputs.manifest}}
python:
value: ${{steps.vars.outputs.python}}
python-minor:
value: ${{steps.vars.outputs.python-minor}}
python-appimage:
value: ${{steps.vars.outputs.python-appimage}}
runs:
using: "composite"
steps:
- name: Set up Python ${{ matrix.python-version }}
id: py
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Set variables
id: vars
shell: bash
Expand All @@ -23,18 +29,12 @@ runs:
echo "tag=$(git describe --tags)" >> $GITHUB_OUTPUT
echo "draft=$(git describe --tags | sed -e 's/^test.*/true/;s/^v.*/false/')" >> $GITHUB_OUTPUT
echo "manifest=$(cat src/main/resources/base/ayab/firmware/manifest.txt)" >> $GITHUB_OUTPUT
echo "python=python${{matrix.python-version}}" >> $GITHUB_OUTPUT
echo "python-appimage=python${{matrix.python-version}}.9-cp311-cp311-manylinux_2_28_x86_64.AppImage" >> $GITHUB_OUTPUT
echo "python-minor=$(echo '${{steps.py.outputs.python-version}}' | sed -e 's/\.[^.]*$//')" >> $GITHUB_OUTPUT
echo "python-appimage=python${{steps.py.outputs.python-version}}-cp311-cp311-manylinux_2_28_x86_64.AppImage" >> $GITHUB_OUTPUT
jonathanperret marked this conversation as resolved.
Show resolved Hide resolved
- name: Set PACKAGE_VERSION
shell: bash
run: |
echo ${{ steps.vars.outputs.tag }} > src/main/resources/base/ayab/package_version
# remove suffix from semver tag, as fbs does not support them
version_without_suffix=$(echo ${{ steps.vars.outputs.tag }} | sed -E 's/^v?([0-9]+\.[0-9]+\.[0-9]+).*$/\1/')
sed -i -e s/PACKAGE_VERSION/$version_without_suffix/ src/build/settings/base.json
- name: Set up Python ${{ matrix.python-version }}
id: py
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
15 changes: 8 additions & 7 deletions .github/workflows/build-multi-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.11]
python-version: [3.11.9]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: [3.11]
python-version: [3.11.9]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -301,7 +301,7 @@ jobs:
runs-on: macos-14
strategy:
matrix:
python-version: [3.11]
python-version: [3.11.9]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -424,7 +424,8 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.11]
# Using Python 3.11.10 specifically for Linux builds due to python-appimage availability
python-version: [3.11.10]
steps:
- name: Checkout repo into AppDir
uses: actions/checkout@v4
Expand All @@ -440,7 +441,7 @@ jobs:
cp -r !(git) git
shopt -u dotglob
- name: Download AppImage of Python designed for manylinux
run: wget -c https://github.com/niess/python-appimage/releases/download/${{steps.vars.outputs.python}}/${{steps.vars.outputs.python-appimage}}
run: wget -c https://github.com/niess/python-appimage/releases/download/python${{steps.vars.outputs.python-minor}}/${{steps.vars.outputs.python-appimage}}
- name: Extract the AppImage
run: |
chmod +x ${{steps.vars.outputs.python-appimage}}
Expand All @@ -454,12 +455,12 @@ jobs:
./AppRun -m pip install --upgrade pip
./AppRun -m pip install --upgrade setuptools
# hack to fix setup.py script with faulty include
./AppRun -m pip install --global-option=build_ext --global-option="-I$(pwd)/opt/${{steps.vars.outputs.python}}/include/${{steps.vars.outputs.python}}" simpleaudio
./AppRun -m pip install --global-option=build_ext --global-option="-I$(pwd)/opt/${{steps.vars.outputs.python-minor}}/include/${{steps.vars.outputs.python-minor}}" simpleaudio
jonathanperret marked this conversation as resolved.
Show resolved Hide resolved
./AppRun -m pip install -r requirements.build.txt
- name: Add AppDir subdirectories to PATH
run: |
echo "usr/bin" >> $GITHUB_PATH
echo "opt/${{steps.vars.outputs.python}}/bin" >> $GITHUB_PATH
echo "opt/${{steps.vars.outputs.python-minor}}/bin" >> $GITHUB_PATH
- name: Restore cached firmware
id: firmware-cache
uses: actions/cache@v4
Expand Down