Run install_deps.py script when building containers weekly (#7384)
* Don't run CodeQL in PR draft * Speed up analysis workflows * Run install deps on Debian * Add badge to readme * Fixed copy and use workdir * Use mount instead of copy * Fixed unwanted && and changed workdir * Split deps and deps-full * Fixed context * Use /app dir * Use copy instead * Revert to --mount and use .py (not .sh) * Test * Add `./scripts/install_deps.py` to all platforms * Add missing syntax * Fixed Python dep for OpenSUSE * Temp remove WORKDIR for OpenSUSE * Re-add workdir * Increase timeout * Delete `zypper --non-interactive remove busybox-which` * Restore python3 * Test * Rename to `lint-source-code` * Beef up analysis runners * Fixed workflow runs-on * Use deps script * Try pipx for gcovr * Use containers with deps * Add -y arg * Install curl * Merge deps step * Add unzip dep * Make Git dir safe * Add .local/bin to env * Improve step name * Use `pipx ensurepath` * Install gcovr with apt * Use Ubuntu 22 with pip * Update ChangeLog * Use 16-core for Windows * Use choco cache * Test * Use 8-core for Windows (picked up quicker, more available?)
This commit is contained in:
parent
a4e1beb79d
commit
481680d072
12 changed files with 89 additions and 40 deletions
13
.github/docker/archlinux/Dockerfile
vendored
13
.github/docker/archlinux/Dockerfile
vendored
|
|
@ -1,6 +1,17 @@
|
||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
ARG BASE_IMAGE
|
ARG BASE_IMAGE
|
||||||
FROM $BASE_IMAGE AS base
|
FROM $BASE_IMAGE AS base
|
||||||
|
|
||||||
RUN pacman -Syu --noconfirm git python sudo && pacman -Scc --noconfirm
|
FROM base AS deps
|
||||||
|
|
||||||
|
RUN pacman -Syu --noconfirm git python sudo && \
|
||||||
|
pacman -Scc --noconfirm
|
||||||
|
|
||||||
RUN useradd -m build
|
RUN useradd -m build
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN --mount=type=bind,target=/app,rw \
|
||||||
|
./scripts/install_deps.py && \
|
||||||
|
pacman -Scc --noconfirm
|
||||||
|
|
|
||||||
15
.github/docker/debian/Dockerfile
vendored
15
.github/docker/debian/Dockerfile
vendored
|
|
@ -1,4 +1,17 @@
|
||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
ARG BASE_IMAGE
|
ARG BASE_IMAGE
|
||||||
FROM $BASE_IMAGE AS base
|
FROM $BASE_IMAGE AS base
|
||||||
|
|
||||||
RUN apt update && apt dist-upgrade -y && apt install -y git python3 && apt clean
|
FROM base AS deps
|
||||||
|
|
||||||
|
RUN apt update && \
|
||||||
|
apt dist-upgrade -y && \
|
||||||
|
apt install -y git python3 && \
|
||||||
|
apt clean
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN --mount=type=bind,target=/app,rw \
|
||||||
|
./scripts/install_deps.py && \
|
||||||
|
apt clean
|
||||||
|
|
|
||||||
14
.github/docker/fedora/Dockerfile
vendored
14
.github/docker/fedora/Dockerfile
vendored
|
|
@ -1,4 +1,16 @@
|
||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
ARG BASE_IMAGE
|
ARG BASE_IMAGE
|
||||||
FROM $BASE_IMAGE AS base
|
FROM $BASE_IMAGE AS base
|
||||||
|
|
||||||
RUN dnf upgrade -y && dnf install -y git python3 && dnf clean all
|
FROM base AS deps
|
||||||
|
|
||||||
|
RUN dnf upgrade -y && \
|
||||||
|
dnf install -y git python3 && \
|
||||||
|
dnf clean all
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN --mount=type=bind,target=/app,rw \
|
||||||
|
./scripts/install_deps.py && \
|
||||||
|
dnf clean all
|
||||||
|
|
|
||||||
15
.github/docker/opensuse/Dockerfile
vendored
15
.github/docker/opensuse/Dockerfile
vendored
|
|
@ -1,4 +1,17 @@
|
||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
ARG BASE_IMAGE
|
ARG BASE_IMAGE
|
||||||
FROM $BASE_IMAGE AS base
|
FROM $BASE_IMAGE AS base
|
||||||
|
|
||||||
RUN zypper refresh && zypper update -y && zypper install -y git python3 && zypper clean --all
|
FROM base AS deps
|
||||||
|
|
||||||
|
RUN zypper refresh && \
|
||||||
|
zypper update -y && \
|
||||||
|
zypper install -y git python3 && \
|
||||||
|
zypper clean --all
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN --mount=type=bind,target=/app,rw \
|
||||||
|
./scripts/install_deps.py && \
|
||||||
|
zypper clean --all
|
||||||
|
|
|
||||||
4
.github/workflows/build-containers.yml
vendored
4
.github/workflows/build-containers.yml
vendored
|
|
@ -18,7 +18,7 @@ jobs:
|
||||||
name: ${{ matrix.os.name }}
|
name: ${{ matrix.os.name }}
|
||||||
runs-on: ${{ matrix.os.runs-on }}
|
runs-on: ${{ matrix.os.runs-on }}
|
||||||
if: ${{ vars.BUILD_CONTAINERS }}
|
if: ${{ vars.BUILD_CONTAINERS }}
|
||||||
timeout-minutes: 5
|
timeout-minutes: 10
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
|
@ -100,7 +100,7 @@ jobs:
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
context: ./.github/docker/${{ matrix.os.config-dir }}
|
context: .
|
||||||
file: ./.github/docker/${{ matrix.os.config-dir }}/Dockerfile
|
file: ./.github/docker/${{ matrix.os.config-dir }}/Dockerfile
|
||||||
tags: symless/synergy-core:${{ matrix.os.name }}
|
tags: symless/synergy-core:${{ matrix.os.name }}
|
||||||
build-args: BASE_IMAGE=${{ matrix.os.base-image }}
|
build-args: BASE_IMAGE=${{ matrix.os.base-image }}
|
||||||
|
|
|
||||||
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
|
|
@ -46,7 +46,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
target:
|
target:
|
||||||
- name: windows-2022-x64
|
- name: windows-2022-x64
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022-8-core-x64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -54,6 +54,12 @@ jobs:
|
||||||
with:
|
with:
|
||||||
submodules: "recursive"
|
submodules: "recursive"
|
||||||
|
|
||||||
|
- name: Cache Chocolatey packages
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ runner.temp }}/choco
|
||||||
|
key: choco-${{ hashFiles('Chocolatey.config') }}
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: python ./scripts/install_deps.py
|
run: python ./scripts/install_deps.py
|
||||||
|
|
||||||
|
|
@ -61,14 +67,12 @@ jobs:
|
||||||
run: python ./scripts/github_env.py --set-qt-version
|
run: python ./scripts/github_env.py --set-qt-version
|
||||||
|
|
||||||
- name: Cache Qt
|
- name: Cache Qt
|
||||||
id: cache-qt
|
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ env.QT_BASE_DIR }}
|
path: ${{ env.QT_BASE_DIR }}
|
||||||
key: ${{ runner.os }}-Qt_${{ env.QT_VERSION }}
|
key: ${{ runner.os }}-Qt_${{ env.QT_VERSION }}
|
||||||
|
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
if: steps.cache-qt.outputs.cache-hit != 'true'
|
|
||||||
run: python ./scripts/install_deps.py --only qt
|
run: python ./scripts/install_deps.py --only qt
|
||||||
|
|
||||||
- name: Setup VC++ environment
|
- name: Setup VC++ environment
|
||||||
|
|
|
||||||
36
.github/workflows/codeql-analysis.yml
vendored
36
.github/workflows/codeql-analysis.yml
vendored
|
|
@ -17,8 +17,11 @@ concurrency:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
|
if: ${{ !github.event.pull_request.draft }}
|
||||||
|
|
||||||
name: Analyze
|
name: Analyze
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04-16-core-x64
|
||||||
|
container: symless/synergy-core:ubuntu-24.04-amd64
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
|
|
@ -27,29 +30,16 @@ jobs:
|
||||||
language: ["cpp"]
|
language: ["cpp"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies
|
- name: Checkout
|
||||||
run: |
|
uses: actions/checkout@v4
|
||||||
sudo apt-get update; \
|
with:
|
||||||
sudo apt-get install -y \
|
submodules: "recursive"
|
||||||
build-essential \
|
|
||||||
cmake \
|
|
||||||
debhelper \
|
|
||||||
devscripts \
|
|
||||||
git \
|
|
||||||
libavahi-compat-libdnssd-dev \
|
|
||||||
libgdk-pixbuf2.0-dev \
|
|
||||||
libgl1-mesa-dev \
|
|
||||||
libglib2.0-dev \
|
|
||||||
libnotify-dev \
|
|
||||||
libssl-dev \
|
|
||||||
libx11-dev \
|
|
||||||
libxtst-dev \
|
|
||||||
qtbase5-dev \
|
|
||||||
qttools5-dev \
|
|
||||||
qttools5-dev-tools
|
|
||||||
|
|
||||||
- name: Checkout git repo
|
- name: Config Git safe dir
|
||||||
uses: actions/checkout@v3
|
run: git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: ./scripts/install_deps.py
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v3
|
uses: github/codeql-action/init@v3
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ on:
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint-cmake-files:
|
lint-source-code:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
|
|
||||||
17
.github/workflows/sonarcloud-analysis.yml
vendored
17
.github/workflows/sonarcloud-analysis.yml
vendored
|
|
@ -18,7 +18,9 @@ concurrency:
|
||||||
jobs:
|
jobs:
|
||||||
sonarcloud-analysis:
|
sonarcloud-analysis:
|
||||||
if: ${{ vars.SONAR_SCANNER_ENABLED }}
|
if: ${{ vars.SONAR_SCANNER_ENABLED }}
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
runs-on: ubuntu-24.04-16-core-x64
|
||||||
|
container: symless/synergy-core:ubuntu-22.04-amd64
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
|
@ -30,13 +32,16 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
submodules: "recursive"
|
||||||
|
|
||||||
|
- name: Config Git safe dir
|
||||||
|
run: git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: ./scripts/install_deps.py
|
run: |
|
||||||
|
./scripts/install_deps.py &&
|
||||||
- name: Install gcovr
|
apt install curl unzip -y &&
|
||||||
run: pip install gcovr
|
pip install gcovr
|
||||||
|
|
||||||
- name: Install SonarScanner
|
- name: Install SonarScanner
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ Enhancements:
|
||||||
- #7380 Add `qt6-qpa-plugins` Qt dependency for Debian
|
- #7380 Add `qt6-qpa-plugins` Qt dependency for Debian
|
||||||
- #7381 Set macOS min version to macOS 12.0
|
- #7381 Set macOS min version to macOS 12.0
|
||||||
- #7382 Re-run `macdeployqt6` to copy missing Qt 6 dependencies
|
- #7382 Re-run `macdeployqt6` to copy missing Qt 6 dependencies
|
||||||
|
- #7384 Run `install_deps.py` script when building containers weekly
|
||||||
|
|
||||||
# 1.14.6
|
# 1.14.6
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
[](https://github.com/symless/synergy-core/actions/workflows/ci.yml)
|
[](https://github.com/symless/synergy-core/actions/workflows/ci.yml)
|
||||||
[](https://github.com/symless/synergy-core/actions/workflows/codeql-analysis.yml)
|
[](https://github.com/symless/synergy-core/actions/workflows/codeql-analysis.yml)
|
||||||
[](https://github.com/symless/synergy-core/actions/workflows/sonarcloud-analysis.yml)
|
[](https://github.com/symless/synergy-core/actions/workflows/sonarcloud-analysis.yml)
|
||||||
|
[](https://github.com/symless/synergy-core/actions/workflows/build-containers.yml)
|
||||||
|
|
||||||
This is the open source core component of Synergy, a keyboard and mouse sharing tool.
|
This is the open source core component of Synergy, a keyboard and mouse sharing tool.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,6 @@ config:
|
||||||
opensuse-tumbleweed: &opensuse-tumbleweed
|
opensuse-tumbleweed: &opensuse-tumbleweed
|
||||||
dependencies:
|
dependencies:
|
||||||
command: sudo zypper refresh; \
|
command: sudo zypper refresh; \
|
||||||
sudo zypper --non-interactive remove busybox-which; \
|
|
||||||
sudo zypper install -y --force-resolution \
|
sudo zypper install -y --force-resolution \
|
||||||
cmake \
|
cmake \
|
||||||
make \
|
make \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue