Skip to content

Update actions to v4 #647

Update actions to v4

Update actions to v4 #647

Workflow file for this run

name: CI
on:
push:
jobs:
smoketests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: .flatpak-builder
key: ${{ runner.os }}-flatpak-builder
- name: Install latest flatpak and flatpak-builder
run: |
sudo add-apt-repository ppa:flatpak/stable
sudo apt-get update
sudo apt-get install -y flatpak flatpak-builder
- name: Set up flathub remote
run: |
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
# TODO: Remove this workaround once flatpak-builder v1.2.3 is available through the above PPA.
- name: Allow file:// clones with git>=2.38.1
run: |
git config --global protocol.file.allow always
- name: Build org.flatpak.Builder
run: |
flatpak-builder --verbose --user --sandbox --force-clean --repo=repo \
--install-deps-from=flathub --default-branch=localtest --ccache \
--install builddir org.flatpak.Builder.json
- name: Check if org.flatpak.Builder launches
run: |
flatpak run org.flatpak.Builder//localtest --version
- name: Check if appstreamcli launches
run: |
flatpak run --command=appstreamcli org.flatpak.Builder//localtest vercmp 1 2
- name: Check if desktop-file-validate launches
run: |
flatpak run --command=desktop-file-validate org.flatpak.Builder//localtest --version
- name: Check if ostree launches
run: |
flatpak run --command=ostree org.flatpak.Builder//localtest --version
- name: Check if 7z works
run: |
curl -sL https://github.com/ip7z/7zip/releases/download/24.07/7z2407-src.7z > 7z-src.7z
flatpak run --filesystem=$(pwd) --command=7z org.flatpak.Builder//localtest x -y 7z-src.7z
- name: Check if rpm2cpio works
run: |
curl -sL https://archives.fedoraproject.org/pub/archive/fedora/linux/core/1/x86_64/os/Fedora/RPMS/bash-2.05b-34.x86_64.rpm > bash.rpm
flatpak run --filesystem=$(pwd) --command=rpm2cpio org.flatpak.Builder//localtest bash.rpm|cpio -i -d
- name: Check if git-lfs works
run: |
flatpak run --filesystem=$(pwd) --command=git org.flatpak.Builder//localtest lfs env
- name: Check if svn works
run: |
flatpak run --command=svn org.flatpak.Builder//localtest info --depth empty --show-item revision https://svn.code.sf.net/p/freeimage/svn/
- name: Sanity check the linter
run: |
flatpak run --command=flatpak-builder-lint org.flatpak.Builder//localtest --exceptions manifest org.flatpak.Builder.json
flatpak run --command=flatpak-builder-lint org.flatpak.Builder//localtest --exceptions builddir builddir
flatpak run --command=flatpak-builder-lint org.flatpak.Builder//localtest --exceptions repo repo
- name: Build org.freedesktop.appstream-glib with org.flatpak.Builder
run: |
git clone --depth=1 --branch master --single-branch https://github.com/flathub/org.freedesktop.appstream-glib
cd org.freedesktop.appstream-glib
dbus-run-session flatpak run org.flatpak.Builder//localtest --verbose --user --sandbox \
--force-clean --install-deps-from=flathub --default-branch=localtest \
--state-dir=../.flatpak-builder --ccache --disable-cache \
--install builddir org.freedesktop.appstream-glib.json
- name: Build com.jetbrains.GoLand with org.flatpak.Builder
run: |
git clone --depth=1 --branch master --recursive --single-branch https://github.com/flathub/com.jetbrains.GoLand
cd com.jetbrains.GoLand
dbus-run-session flatpak run org.flatpak.Builder//localtest --verbose --user --sandbox \
--force-clean --install-deps-from=flathub --default-branch=localtest \
--state-dir=../.flatpak-builder --ccache --disable-cache --mirror-screenshots-url=https://domain.tld \
--install builddir com.jetbrains.GoLand.yaml