Skip to content

[SFOS 4.6] Support new theme icon location #259

[SFOS 4.6] Support new theme icon location

[SFOS 4.6] Support new theme icon location #259

Workflow file for this run

name: CI on PRs to master & patchmanager3 branches
on:
pull_request:
branches:
- master
- patchmanager3
# Allows to run this workflow manually from the Actions tab.
workflow_dispatch:
env:
# Do not wait up to the default of 10 minutes for network timeouts in a workflow which runs ca. 5 minutes.
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
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:
# Solely builds for i486 on 3.4.0, because of https://github.com/sailfishos-patches/patchmanager/pull/437#issuecomment-1615317003
ARCH: i486
RELEASE: 3.4.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 build
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_${{ 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 }}
# Just for fun, see https://feathericons.com/ and
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#branding
#branding: # "Invalid workflow file: Unexpected value 'branding'"; maybe action MUST be located in '/' or the name MUST be action.yml or both, see e.g., https://github.com/actions/cache/blob/main/action.yml#L37
# icon: 'gift'
# color: 'purple'