CI: Update Docker image used for building AppImage. (#2537) #1211
This file contains 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
name: Build Mu | |
on: | |
push: | |
branches: 'master' | |
pull_request: | |
branches: '*' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [macos-13, windows-2019] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
name: Build ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
- name: Display Python info | |
run: | | |
python -c "import sys; print(sys.version)" | |
python -c "import platform, struct; print(platform.machine(), struct.calcsize('P') * 8)" | |
python -c "import sys; print(sys.executable)" | |
python -m pip --version | |
pip --version | |
pip config list | |
pip freeze | |
- name: Install Mu test dependencies | |
run: | | |
pip install .[tests] | |
pip list | |
- run: mkdir upload | |
- name: Build Windows 64 bit | |
if: runner.os == 'Windows' | |
run: | | |
python make.py win64 | |
dir dist/*.msi | rename-item -newname { $_.name -replace ".msi"," (64 bit).msi" } | |
mv dist/*.msi upload/ | |
- name: Build macOS | |
if: runner.os == 'macOS' | |
run: | | |
make macos | |
mv dist/*.dmg upload/ | |
- name: Upload Mu installer | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mu-editor-${{ runner.os }}-${{ github.sha }} | |
path: upload | |
build-linux: | |
runs-on: ubuntu-20.04 | |
container: | |
image: ghcr.io/mu-editor/mu-appimage:2024.12.02 | |
name: Build AppImage | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Display system info | |
run: | | |
uname -a | |
cat /etc/os-release | |
ldd --version | |
python -c "import sys; print(sys.version)" | |
python -c "import platform, struct; print(platform.machine(), struct.calcsize('P') * 8)" | |
python -c "import sys; print(sys.executable)" | |
python -m pip --version | |
pip --version | |
pip list --verbose | |
- name: Install Mu test dependencies | |
run: | | |
pip install .[tests] | |
pip list | |
- name: Build Linux AppImage | |
run: QT_QPA_PLATFORM=offscreen make linux | |
# GitHub actions upload artifact breaks permissions, workaround using tar | |
# https://github.com/actions/upload-artifact/issues/38 | |
- name: Tar AppImage to maintain permissions | |
run: | | |
cd dist/ | |
tar -cvf Mu_Editor-AppImage-x86_64-${{ github.sha }}.tar *.AppImage | |
ls -la . | |
- name: Upload Mu AppImage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mu-editor-${{ runner.os }}-${{ github.sha }} | |
path: dist/Mu_Editor-AppImage-x86_64-${{ github.sha }}.tar |