Skip to content

Fix MS Word export performance (#96) #143

Fix MS Word export performance (#96)

Fix MS Word export performance (#96) #143

Workflow file for this run

name: Build and release for Linux
on:
push:
branches:
- main
jobs:
check_version:
uses: ./.github/workflows/check-version-tag.yml
fetch:
needs: [check_version]
if: ${{ needs.check_version.outputs.should_run != 'false' }}
runs-on: linux-beefy
name: Fetch external projects
steps:
- name: Turn off line ending conversion in git
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Sparse Checkout
run: |
git clone --no-checkout --depth=1 --filter=blob:none --branch=${{ github.ref_name }} --single-branch --sparse https://github.com/${{ github.repository }} lok
cd lok
git config --local gc.auto 0
tee .git/info/sparse-checkout <<EOF
/*
!/*/
/libreoffice-core/
!/libreoffice-core/translations
!/libreoffice-core/helpcontent2
/libreoffice-core/dictionaries
!/libreoffice-core/dictionaries/*/
/libreoffice-core/dictionaries/en
/libreoffice-core/translations/source
!/libreoffice-core/translations/source/*/
/libreoffice-core/translations/source/en-GB/
/libreoffice-core/translations/source/en-ZA/
EOF
git -c protocol.version=2 checkout
- name: Setup /external-tar
run: |
UID_GID="$(id -u):$(id -g)"
sudo mkdir /external-tar
sudo chown $UID_GID /external-tar
- name: Cache external tarballs
id: cache-external-tar
uses: actions/cache@v3
with:
path: /external-tar
key: external-tar-linux-${{ hashFiles('lok/libreoffice-core/download.lst') }}-${{ hashFiles('lok/libreoffice-core/external/**/*') }}
restore-keys: |
external-tar-linux--${{ hashFiles('lok/libreoffice-core/external/**/*') }}
external-tar-${{ hashFiles('lok/libreoffice-core/download.lst') }}-${{ hashFiles('lok/libreoffice-core/external/**/*') }}
external-tar-${{ hashFiles('lok/libreoffice-core/external/**/*') }}
external-tar--
external-tar-
- name: Install build dependencies
if: steps.cache-external-tar.outputs.cache-hit != 'true'
run: |
sudo apt-get update -y
sudo apt-get install -y libunwind-dev
sudo apt-get install -y git build-essential zip libkrb5-dev nasm graphviz python3 python3-dev autoconf libfontconfig1-dev gperf libxslt1-dev xsltproc libxml2-utils libxrandr-dev libx11-dev bison flex libgtk-3-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libnss3-dev libavahi-client-dev libxt-dev gettext
- name: Configure LOKit and Fetch Tarballs
if: steps.cache-external-tar.outputs.cache-hit != 'true'
env:
PARALLELISM: 4
run: |
cd lok/libreoffice-core
./autogen.sh --with-distro=LOKit-Linux --with-external-tar="/external-tar"
make fetch
build:
needs: [check_version, fetch]
if: ${{ needs.check_version.outputs.should_run != 'false' }}
runs-on: linux-beefy
name: Build
steps:
- name: Remove .NET/Haskell/Android to free up space (~30 GiB)
run: |
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android
- name: Turn off line ending conversion in git
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
run: |
UID_GID="$(id -u):$(id -g)"
sudo mkdir /lok
sudo chown $UID_GID /lok
git -c protocol.version=2 clone --depth=1 --branch=${{github.ref_name}} --single-branch https://github.com/${{ github.repository }} /lok
cd /lok
git config --local gc.auto 0
- name: Install build dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y libunwind-dev
sudo apt-get install -y git build-essential zip libkrb5-dev nasm graphviz python3 python3-dev autoconf libfontconfig1-dev gperf libxslt1-dev xsltproc libxml2-utils libxrandr-dev libx11-dev bison flex libgtk-3-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libnss3-dev libavahi-client-dev libxt-dev gettext
- name: Setup /external-tar
run: |
UID_GID="$(id -u):$(id -g)"
sudo mkdir /external-tar
sudo chown $UID_GID /external-tar
- name: Cache external tarballs
id: cache-external-tar
uses: actions/cache@v3
with:
path: /external-tar
key: external-tar-linux-${{ hashFiles('/lok/libreoffice-core/download.lst') }}-${{ hashFiles('/lok/libreoffice-core/external/**/*') }}
restore-keys: |
external-tar-linux--${{ hashFiles('lok/libreoffice-core/external/**/*') }}
external-tar-${{ hashFiles('/lok/libreoffice-core/download.lst') }}-${{ hashFiles('/lok/libreoffice-core/external/**/*') }}
external-tar-${{ hashFiles('/lok/libreoffice-core/external/**/*') }}
external-tar--
external-tar-
- name: Build
env:
PARALLELISM: 4
run: |
cd /lok/libreoffice-core
./autogen.sh --with-distro=LOKit-Linux --with-external-tar="/external-tar"
make build
cd /lok
./scripts/extract-symbols.sh
- name: Make artifact
run: |
cd /lok/libreoffice-core
/usr/bin/tar -cJf libreofficekit.tar.xz instdir
cp libreofficekit.tar.xz $GITHUB_WORKSPACE/libreofficekit-linux.tar.xz
(cd workdir && /usr/bin/tar -cJf ../debug-symbols.tar.xz debug)
cp debug-symbols.tar.xz $GITHUB_WORKSPACE/debug-symbols-linux.tar.xz
cd $GITHUB_WORKSPACE
sha256sum libreofficekit-linux.tar.xz > libreofficekit-linux.tar.xz.sha256sum
sha256sum debug-symbols-linux.tar.xz > debug-symbols-linux.tar.xz.sha256sum
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "libreofficekit-linux.tar.xz,libreofficekit-linux.tar.xz.sha256sum,debug-symbols-linux.tar.xz,debug-symbols-linux.tar.xz.sha256sum"
allowUpdates: true
artifactErrorsFailBuild: true
name: ${{ needs.check_version.outputs.version }}
tag: ${{ needs.check_version.outputs.version }}
body: |
This is an automated release built from the `main` branch.
For changes, please review the commit log.