ci: use actionlint and problem matchers (#4116)
This commit is contained in:
parent
4bac84ee38
commit
99cf9ac960
23 changed files with 215 additions and 120 deletions
4
.github/workflows/ci-copr.yml
vendored
4
.github/workflows/ci-copr.yml
vendored
|
|
@ -16,6 +16,10 @@ on:
|
|||
required: false
|
||||
COPR_CLI_CONFIG:
|
||||
required: false
|
||||
GH_BOT_TOKEN:
|
||||
required: false
|
||||
VIRUSTOTAL_API_KEY:
|
||||
required: false
|
||||
|
||||
concurrency:
|
||||
group: "_${{ github.workflow }}-${{ github.ref }}"
|
||||
|
|
|
|||
41
.github/workflows/ci-flatpak.yml
vendored
41
.github/workflows/ci-flatpak.yml
vendored
|
|
@ -73,15 +73,16 @@ jobs:
|
|||
cmake \
|
||||
flatpak
|
||||
|
||||
sudo su $(whoami) -c "flatpak --user remote-add --if-not-exists flathub \
|
||||
https://flathub.org/repo/flathub.flatpakrepo"
|
||||
sudo su "$(whoami)" -c "flatpak --user remote-add --if-not-exists flathub \
|
||||
https://flathub.org/repo/flathub.flatpakrepo
|
||||
"
|
||||
|
||||
sudo su $(whoami) -c "flatpak --user install -y flathub \
|
||||
sudo su "$(whoami)" -c "flatpak --user install -y flathub \
|
||||
org.flatpak.Builder \
|
||||
org.freedesktop.Platform/${{ matrix.arch }}/${PLATFORM_VERSION} \
|
||||
org.freedesktop.Sdk/${{ matrix.arch }}/${PLATFORM_VERSION} \
|
||||
org.freedesktop.Sdk.Extension.node${NODE_VERSION}/${{ matrix.arch }}/${PLATFORM_VERSION} \
|
||||
"
|
||||
"
|
||||
|
||||
flatpak run org.flatpak.Builder --version
|
||||
|
||||
|
|
@ -101,9 +102,11 @@ jobs:
|
|||
flatpak-${{ matrix.arch }}-
|
||||
|
||||
- name: Configure Flatpak Manifest
|
||||
env:
|
||||
BRANCH: ${{ github.head_ref }}
|
||||
run: |
|
||||
# variables for manifest
|
||||
branch="${{ github.head_ref }}"
|
||||
branch="${{ env.BRANCH }}"
|
||||
build_version=${{ inputs.release_version }}
|
||||
commit=${{ inputs.release_commit }}
|
||||
|
||||
|
|
@ -137,19 +140,20 @@ jobs:
|
|||
|
||||
- name: Debug Manifest
|
||||
working-directory: build
|
||||
run: cat ${APP_ID}.yml
|
||||
run: cat "${APP_ID}.yml"
|
||||
|
||||
- name: Build Linux Flatpak
|
||||
working-directory: build
|
||||
run: |
|
||||
sudo su $(whoami) -c "flatpak run org.flatpak.Builder \
|
||||
echo "::add-matcher::.github/matchers/gcc-strip3.json"
|
||||
sudo su "$(whoami)" -c "flatpak run org.flatpak.Builder \
|
||||
--arch=${{ matrix.arch }} \
|
||||
--force-clean \
|
||||
--repo=repo \
|
||||
--sandbox \
|
||||
--stop-at=cuda build-sunshine ${APP_ID}.yml"
|
||||
cp -r .flatpak-builder copy-of-flatpak-builder
|
||||
sudo su $(whoami) -c "flatpak run org.flatpak.Builder \
|
||||
sudo su "$(whoami)" -c "flatpak run org.flatpak.Builder \
|
||||
--arch=${{ matrix.arch }} \
|
||||
--force-clean \
|
||||
--repo=repo \
|
||||
|
|
@ -157,15 +161,16 @@ jobs:
|
|||
build-sunshine ${APP_ID}.yml"
|
||||
rm -rf .flatpak-builder
|
||||
mv copy-of-flatpak-builder .flatpak-builder
|
||||
sudo su $(whoami) -c "flatpak build-bundle \
|
||||
sudo su "$(whoami)" -c "flatpak build-bundle \
|
||||
--arch=${{ matrix.arch }} \
|
||||
./repo \
|
||||
../artifacts/sunshine_${{ matrix.arch }}.flatpak ${APP_ID}"
|
||||
sudo su $(whoami) -c "flatpak build-bundle \
|
||||
sudo su "$(whoami)" -c "flatpak build-bundle \
|
||||
--runtime \
|
||||
--arch=${{ matrix.arch }} \
|
||||
./repo \
|
||||
../artifacts/sunshine_debug_${{ matrix.arch }}.flatpak ${APP_ID}.Debug"
|
||||
echo "::remove-matcher owner=gcc-strip3::"
|
||||
|
||||
- name: Lint Flatpak
|
||||
working-directory: build
|
||||
|
|
@ -177,7 +182,7 @@ jobs:
|
|||
--exceptions \
|
||||
--user-exceptions "${exceptions_file}" \
|
||||
manifest \
|
||||
${APP_ID}.yml
|
||||
"${APP_ID}.yml"
|
||||
|
||||
echo "Linting flatpak repo"
|
||||
# TODO: add arg
|
||||
|
|
@ -193,13 +198,13 @@ jobs:
|
|||
if: matrix.arch == 'x86_64'
|
||||
run: |
|
||||
mkdir -p flathub/modules
|
||||
cp ./build/generated-sources.json ./flathub/
|
||||
cp ./build/package-lock.json ./flathub/
|
||||
cp ./build/${APP_ID}.yml ./flathub/
|
||||
cp ./build/${APP_ID}.metainfo.xml ./flathub/
|
||||
cp ./packaging/linux/flatpak/README.md ./flathub/
|
||||
cp ./packaging/linux/flatpak/flathub.json ./flathub/
|
||||
cp -r ./packaging/linux/flatpak/modules/. ./flathub/modules/
|
||||
cp "./build/generated-sources.json" "./flathub/"
|
||||
cp "./build/package-lock.json" "./flathub/"
|
||||
cp "./build/${APP_ID}.yml" "./flathub/"
|
||||
cp "./build/${APP_ID}.metainfo.xml" "./flathub/"
|
||||
cp "./packaging/linux/flatpak/README.md" "./flathub/"
|
||||
cp "./packaging/linux/flatpak/flathub.json" "./flathub/"
|
||||
cp -r "./packaging/linux/flatpak/modules/." "./flathub/modules/"
|
||||
# submodules will need to be handled in the workflow that creates the PR
|
||||
|
||||
# create the archive
|
||||
|
|
|
|||
16
.github/workflows/ci-homebrew.yml
vendored
16
.github/workflows/ci-homebrew.yml
vendored
|
|
@ -73,9 +73,13 @@ jobs:
|
|||
brew install python3
|
||||
|
||||
- name: Configure formula
|
||||
env:
|
||||
HEAD_REF: ${{ github.head_ref }}
|
||||
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
|
||||
PR_DEFAULT_BRANCH: ${{ github.event.pull_request.head.repo.default_branch }}
|
||||
run: |
|
||||
# variables for formula
|
||||
branch="${{ github.head_ref }}"
|
||||
branch="${{ env.HEAD_REF }}"
|
||||
build_version=${{ inputs.release_version }}
|
||||
commit=${{ inputs.release_commit }}
|
||||
|
||||
|
|
@ -96,9 +100,9 @@ jobs:
|
|||
else
|
||||
echo "This is a PR event"
|
||||
clone_url=${{ github.event.pull_request.head.repo.clone_url }}
|
||||
branch="${{ github.event.pull_request.head.ref }}"
|
||||
default_branch="${{ github.event.pull_request.head.repo.default_branch }}"
|
||||
tag="${{ github.event.pull_request.head.ref }}"
|
||||
branch="${{ env.PR_HEAD_REF }}"
|
||||
default_branch="${{ env.PR_DEFAULT_BRANCH }}"
|
||||
tag="${{ env.PR_HEAD_REF }}"
|
||||
fi
|
||||
echo "Branch: ${branch}"
|
||||
echo "Clone URL: ${clone_url}"
|
||||
|
|
@ -143,8 +147,9 @@ jobs:
|
|||
export DISPLAY=:1
|
||||
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
|
||||
|
||||
echo "DISPLAY=${DISPLAY}" >> $GITHUB_ENV
|
||||
echo "DISPLAY=${DISPLAY}" >> "${GITHUB_ENV}"
|
||||
|
||||
- run: echo "::add-matcher::.github/matchers/gcc-strip3.json"
|
||||
- name: Validate Homebrew Formula
|
||||
id: test
|
||||
if: matrix.release != true
|
||||
|
|
@ -156,6 +161,7 @@ jobs:
|
|||
publish: false
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
validate: true
|
||||
- run: echo "::remove-matcher owner=gcc-strip3::"
|
||||
|
||||
- name: Setup python
|
||||
id: python
|
||||
|
|
|
|||
8
.github/workflows/ci-linux.yml
vendored
8
.github/workflows/ci-linux.yml
vendored
|
|
@ -79,8 +79,8 @@ jobs:
|
|||
--enable-x11 \
|
||||
--enable-glx \
|
||||
--enable-wayland \
|
||||
--without-legacy # emgd, nvctrl, fglrx
|
||||
make -j $(nproc)
|
||||
--without-legacy
|
||||
make -j "$(nproc)"
|
||||
sudo make install
|
||||
cd .. && rm -rf libva-*
|
||||
|
||||
|
|
@ -91,6 +91,7 @@ jobs:
|
|||
COMMIT: ${{ inputs.release_commit }}
|
||||
run: |
|
||||
chmod +x ./scripts/linux_build.sh
|
||||
echo "::add-matcher::.github/matchers/gcc.json"
|
||||
./scripts/linux_build.sh \
|
||||
--publisher-name='${{ github.repository_owner }}' \
|
||||
--publisher-website='https://app.lizardbyte.dev' \
|
||||
|
|
@ -98,12 +99,13 @@ jobs:
|
|||
--skip-cleanup \
|
||||
--skip-package \
|
||||
--ubuntu-test-repo ${{ matrix.EXTRA_ARGS }}
|
||||
echo "::remove-matcher owner=gcc::"
|
||||
|
||||
- name: Set AppImage Version
|
||||
if: matrix.name == 'AppImage'
|
||||
run: |
|
||||
version=${{ inputs.release_version }}
|
||||
echo "VERSION=${version}" >> $GITHUB_ENV
|
||||
echo "VERSION=${version}" >> "${GITHUB_ENV}"
|
||||
|
||||
- name: Package Linux - AppImage
|
||||
if: matrix.name == 'AppImage'
|
||||
|
|
|
|||
10
.github/workflows/ci-windows.yml
vendored
10
.github/workflows/ci-windows.yml
vendored
|
|
@ -199,12 +199,12 @@ jobs:
|
|||
ignore_list=$(IFS=,; echo "${ignore_packages[*]}")
|
||||
|
||||
# install pinned dependencies
|
||||
if [ -n "$tarballs" ]; then
|
||||
pacman -U --noconfirm ${tarballs}
|
||||
if [ -n "${tarballs}" ]; then
|
||||
pacman -U --noconfirm "${tarballs}"
|
||||
fi
|
||||
|
||||
# Only add --ignore if we have packages to ignore
|
||||
if [ -n "$ignore_list" ]; then
|
||||
if [ -n "${ignore_list}" ]; then
|
||||
pacman -Syu --noconfirm --ignore="${ignore_list}" "${dependencies[@]}"
|
||||
else
|
||||
pacman -Syu --noconfirm "${dependencies[@]}"
|
||||
|
|
@ -251,7 +251,7 @@ jobs:
|
|||
|
||||
# step output
|
||||
echo "python-path=${python_path}"
|
||||
echo "python-path=${python_path}" >> $GITHUB_OUTPUT
|
||||
echo "python-path=${python_path}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Build Windows
|
||||
shell: msys2 {0}
|
||||
|
|
@ -272,7 +272,9 @@ jobs:
|
|||
-DSUNSHINE_PUBLISHER_NAME='${{ github.repository_owner }}' \
|
||||
-DSUNSHINE_PUBLISHER_WEBSITE='https://app.lizardbyte.dev' \
|
||||
-DSUNSHINE_PUBLISHER_ISSUE_URL='https://app.lizardbyte.dev/support'
|
||||
echo "::add-matcher::.github/matchers/gcc.json"
|
||||
ninja -C build
|
||||
echo "::remove-matcher owner=gcc::"
|
||||
|
||||
- name: Package Windows
|
||||
shell: msys2 {0}
|
||||
|
|
|
|||
8
.github/workflows/localize.yml
vendored
8
.github/workflows/localize.yml
vendored
|
|
@ -48,9 +48,9 @@ jobs:
|
|||
if [ -f "${{ env.file }}" ];
|
||||
then
|
||||
rm ${{ env.file }}
|
||||
echo "new_file=false" >> $GITHUB_ENV
|
||||
echo "new_file=false" >> "${GITHUB_ENV}"
|
||||
else
|
||||
echo "new_file=true" >> $GITHUB_ENV
|
||||
echo "new_file=true" >> "${GITHUB_ENV}"
|
||||
fi
|
||||
|
||||
# extract the new strings
|
||||
|
|
@ -67,7 +67,7 @@ jobs:
|
|||
|
||||
# set the variable with minimal output, replacing `\t` with ` `
|
||||
OUTPUT=$(git diff --numstat locale/sunshine.po | sed -e "s#\t# #g")
|
||||
echo "git_diff=${OUTPUT}" >> $GITHUB_ENV
|
||||
echo "git_diff=${OUTPUT}" >> "${GITHUB_ENV}"
|
||||
|
||||
- name: git reset
|
||||
# only run if a single line changed (date/time) and file already existed
|
||||
|
|
@ -79,7 +79,7 @@ jobs:
|
|||
|
||||
- name: Get current date
|
||||
id: date
|
||||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||
run: echo "date=$(date +'%Y-%m-%d')" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Create/Update Pull Request
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue