[pull] master from moneymanagerex:master #1049
This file contains hidden or 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: Ubuntu CI Build | |
| on: | |
| push: | |
| branches: | |
| - "master" | |
| pull_request: | |
| branches: | |
| - "master" | |
| types: [opened, reopened, synchronize] | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, ubuntu-24.04] | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Install Dependencies | |
| id: init | |
| run: | | |
| echo "wxVer=3.3.2" >> $GITHUB_OUTPUT | |
| sudo apt update | |
| sudo apt install -y --no-install-recommends \ | |
| cmake build-essential libssl-dev gettext git pkg-config lsb-release file ccache \ | |
| libgtk-3-dev liblua5.3-dev libcurl4-openssl-dev libwebkit2gtk-4.1-dev wget appstream fuse | |
| - name: Restore wxWidgets Cache | |
| id: restore-cache-wxWidgets | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: /home/runner/work/wxWidgets | |
| key: wxWidgets-${{steps.init.outputs.wxVer}}-${{ matrix.os }}-v3 | |
| - name: Build wxWidgets | |
| if: steps.restore-cache-wxWidgets.outputs.cache-hit != 'true' | |
| run: | | |
| cd /home/runner/work | |
| wget https://github.com/wxWidgets/wxWidgets/releases/download/v${{steps.init.outputs.wxVer}}/wxWidgets-${{steps.init.outputs.wxVer}}.tar.bz2 | |
| tar -xjf wxWidgets-${{steps.init.outputs.wxVer}}.tar.bz2 | |
| mv wxWidgets-${{steps.init.outputs.wxVer}} wxWidgets | |
| cd wxWidgets | |
| mkdir -p build-linux && cd build-linux | |
| ../configure --enable-std_containers --disable-shared --with-cxx=17 --enable-webview --with-gtk=3 --enable-intl | |
| make -j$(nproc) | |
| - name: Save wxWidgets Cache | |
| if: steps.restore-cache-wxWidgets.outputs.cache-hit != 'true' | |
| id: save-cache-wxWidgets | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: /home/runner/work/wxWidgets | |
| key: wxWidgets-${{steps.init.outputs.wxVer}}-${{ matrix.os }}-v3 | |
| - name: Install wxWidgets | |
| run: | | |
| cd /home/runner/work/wxWidgets/build-linux | |
| sudo make install | |
| sudo ldconfig | |
| - name: Checkout latest release | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Build MoneyManagerEx | |
| id: mmex-build | |
| run: | | |
| cd $GITHUB_WORKSPACE | |
| mkdir -p build | |
| cd build | |
| cmake .. | |
| export MAKEFLAGS=-j$(nproc) | |
| cmake --build . --target package | |
| mkdir -p /home/runner/work/moneymanagerex/moneymanagerex/build/AppDir | |
| make install DESTDIR=/home/runner/work/moneymanagerex/moneymanagerex/build/AppDir | |
| echo "artifact_name=$(ls mmex*.deb)" >> $GITHUB_OUTPUT | |
| - name: Upload DEB Package | |
| if: ${{ github.event_name == 'push' && github.repository == 'moneymanagerex/moneymanagerex' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ steps.mmex-build.outputs.artifact_name }} | |
| path: ${{ github.workspace }}/build/mmex*.deb | |
| #- name: Install Sigstore Python dependencies | |
| # if: ${{ github.event_name == 'push' && github.repository == 'moneymanagerex/moneymanagerex' }} | |
| # run: python -m pip install email-validator | |
| #- name: Sign and Upload DEB | |
| # if: ${{ github.event_name == 'push' && github.repository == 'moneymanagerex/moneymanagerex' }} | |
| # uses: sigstore/gh-action-sigstore-python@v2.1.1 | |
| # with: | |
| # inputs: ${{ github.workspace }}/build/mmex*.deb | |
| # upload-signing-artifacts: true | |
| - name: Generate AppImage | |
| if: ${{ matrix.os == 'ubuntu-22.04' }} | |
| id: appimage-build | |
| run: | | |
| cd /home/runner/work/moneymanagerex/moneymanagerex/build | |
| wget -O appimage-builder-x86_64.AppImage.tar https://github.com/Lord-Kamina/appimage-builder/releases/download/continuous/appimage-builder_x86_64-AppImage.tar | |
| tar xvf appimage-builder-x86_64.AppImage.tar --transform='s/.*\///' | |
| mv appimage-builder-*-x86_64.AppImage appimage-builder | |
| chmod +x appimage-builder | |
| cp ../.appimage-builder.yml . | |
| sed -i "s/version: latest/version: $(grep '^Version ' ../NEWS | head -n 1 | sed 's/Version //;s/ /-/;s/ /./')/" .appimage-builder.yml | |
| ./appimage-builder --recipe .appimage-builder.yml | |
| echo "artifact_name=$(ls MMEX*.AppImage)" >> $GITHUB_OUTPUT | |
| - name: Upload AppImage | |
| if: ${{ matrix.os == 'ubuntu-22.04' && github.event_name == 'push' && github.repository == 'moneymanagerex/moneymanagerex' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ steps.appimage-build.outputs.artifact_name }} | |
| path: ${{ github.workspace }}/build/MMEX*.AppImage | |
| #- name: Sign and Upload AppImage | |
| # if: ${{ matrix.os == 'ubuntu-22.04' && github.event_name == 'push' && github.repository == 'moneymanagerex/moneymanagerex'}} | |
| # uses: sigstore/gh-action-sigstore-python@v2.1.1 | |
| # with: | |
| # inputs: ${{ github.workspace }}/build/MMEX*.AppImage | |
| # upload-signing-artifacts: true | |