Skip to content

Re-enable and fix translations/sailfishos-chum-gui-it.ts #465

Re-enable and fix translations/sailfishos-chum-gui-it.ts

Re-enable and fix translations/sailfishos-chum-gui-it.ts #465

Workflow file for this run

name: CI on Pull Request to main branch
on:
pull_request:
branches:
- main
# Allows to run this workflow manually from the Actions tab.
workflow_dispatch:
defaults:
run:
# Note that 'bash' provides -o pipefail, in contrast to the default (i.e., unspecified, which also uses bash) or 'sh',
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell
shell: sh
# Do not use concurrency in order to enforce checking every commit of a Pull Request.
# See, e.g.: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow
#concurrency:
#group: ci-${{ github.ref_name }}
# 'false' (default) allows for two concurrent runs, one executing and one freshly enqueued; 'true' for only one; no 'concurrency:' defined for multiple.
#cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-22.04
env:
# Do not wait up to the default of 10 minutes for network timeouts in a workflow which runs ca. 4 minutes.
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
# Solely build for i486 on 4.1.0, because of https://github.com/sailfishos-patches/patchmanager/pull/437#issuecomment-1615317003
# and it is the oldest release on which working binaries are generated by this workflow.
ARCH: i486
RELEASE: 4.1.0.24
steps:
- name: Checkout
uses: actions/checkout@v3
#- name: Prepare
# run:
# Caching Docker images is not ready yet, see
# https://github.com/storeman-developers/harbour-storeman-installer/blob/devel/cache-docker-images_github-ci.md
#- name: Cache Docker images of the Sailfish-SDK
# id: cache-sdk
# uses: actions/cache@v3
# with:
# path: $GITHUB_WORKSPACE/…
# key: cache
- name: Build ${{ env.ARCH }} on ${{ env.RELEASE }}
run: |
set -x
mkdir -p output/$RELEASE/$ARCH
docker run --rm -v $PWD:/share coderus/sailfishos-platform-sdk:$RELEASE /bin/sh -xc '
mkdir -p rpmbuild/SOURCES
printf %s "${{ secrets.TOKEN_GITHUB }}" > rpmbuild/SOURCES/token-github.txt
printf %s "${{ secrets.TOKEN_GITLAB }}" > rpmbuild/SOURCES/token-gitlab.txt
printf %s "${{ secrets.TOKEN_FORGEJO }}" > rpmbuild/SOURCES/token-forgejo.txt
mkdir -p build/rpm
cp rpmbuild/SOURCES/token-git??b.txt build/rpm/
cp rpmbuild/SOURCES/token-forgejo.txt build/rpm/
cd build
cp -r /share/. .
mb2 -t SailfishOS-$1-$2 build -d
sudo cp -r RPMS/. /share/output/$1/$2/' sh_mb2 $RELEASE $ARCH
- name: Upload build results
uses: actions/upload-artifact@v3
with:
name: RPM-build-results_SDK-for-${{ env.RELEASE }}_${{ env.ARCH }}
path: output/
# "Create release" does not fit here, because this workflow is triggered by Pull Requests,
# not newly set Git tags.
# - name: Create release
# if: contains(github.ref, 'release')
# run: |
# set -x
# assets=""
# for asset in output/*/*/*.rpm; do
# assets="$assets -a $asset"
# done
# tag_name="${GITHUB_REF##*/}"
# hub release create"$assets" -m "$tag_name" "$tag_name"
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}