Skip to content

Enable localization and follow system language #351

Enable localization and follow system language

Enable localization and follow system language #351

Workflow file for this run

name: Tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Fix apt cache permissions
run: sudo chown -R $(id -u):$(id -g) /var/cache/apt/archives
- name: Cache apt packages
uses: actions/cache@v4
with:
path: /var/cache/apt/archives
key: apt-${{ runner.os }}-qt5-${{ hashFiles('.github/workflows/test.yaml') }}
restore-keys: |
apt-${{ runner.os }}-qt5-
- name: Install Qt5 dev packages
run: |
sudo apt-get update
sudo apt-get install -y qtbase5-dev qt5-qmake cmake build-essential
- name: Fix apt cache permissions
run: |
sudo chown -R $(id -u):$(id -g) /var/cache/apt/archives
sudo rm -rf /var/cache/apt/archives/partial
- name: Build tests
run: |
cd tests
cmake -B build
cmake --build build -j$(nproc)
- name: Run tests
env:
QT_QPA_PLATFORM: offscreen
run: |
cd tests/build
ctest --output-on-failure
build:
name: Build RPM (${{ matrix.arch }})
needs: [test]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [aarch64, i486]
steps:
- name: Free disk space
run: |
sudo rm -rf /usr/local/lib/android /opt/hostedtoolcache /usr/share/dotnet
sudo docker image prune -af 2>/dev/null || true
- uses: actions/checkout@v6
- name: Get Ghostty submodule commit
id: ghostty-commit
run: |
SHA=$(git ls-tree HEAD ghostty | awk '{print $3}')
echo "sha=$SHA" >> "$GITHUB_OUTPUT"
- name: Cache libghostty-vt
id: cache-lib
uses: actions/cache@v4
with:
path: lib/${{ matrix.arch }}
key: libghostty-vt-${{ matrix.arch }}-${{ steps.ghostty-commit.outputs.sha }}
- name: Cache Ghostty submodule
id: cache-submodule
uses: actions/cache@v4
with:
path: .git/modules/ghostty
key: submodule-ghostty-${{ steps.ghostty-commit.outputs.sha }}
restore-keys: |
submodule-ghostty-
- name: Initialize Ghostty submodule
run: git submodule update --init --recursive
- name: Cache Zig
if: steps.cache-lib.outputs.cache-hit != 'true'
id: cache-zig
uses: actions/cache@v4
with:
path: /opt/zig-x86_64-linux-0.16.0
key: zig-0.16.0-linux-x86_64
- name: Install Zig
if: steps.cache-lib.outputs.cache-hit != 'true' && steps.cache-zig.outputs.cache-hit != 'true'
run: |
ZIG_VERSION=0.16.0
curl -L "https://ziglang.org/download/${ZIG_VERSION}/zig-x86_64-linux-${ZIG_VERSION}.tar.xz" | tar -xJ -C /opt
- name: Add Zig to PATH
if: steps.cache-lib.outputs.cache-hit != 'true'
run: echo "/opt/zig-x86_64-linux-0.16.0" >> "$GITHUB_PATH"
- name: Build libghostty-vt
if: steps.cache-lib.outputs.cache-hit != 'true'
run: bash scripts/build-libs.sh ${{ matrix.arch }}
- name: Cache Docker image
id: cache-docker
uses: actions/cache@v4
with:
path: /tmp/sfos-sdk.tar
key: sfos-sdk-5.0.0.43
- name: Load Docker image
if: steps.cache-docker.outputs.cache-hit == 'true'
run: |
docker load -i /tmp/sfos-sdk.tar
rm -f /tmp/sfos-sdk.tar
- name: Build RPM
uses: coderus/github-sfos-build@sfos5
with:
release: 5.0.0.43
arch: ${{ matrix.arch }}
- name: Save Docker image
if: steps.cache-docker.outputs.cache-hit != 'true'
run: docker save coderus/sailfishos-platform-sdk:5.0.0.43 -o /tmp/sfos-sdk.tar