-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from Alexhuszagh/actions
Use Github actions to validate our code.
- Loading branch information
Showing
30 changed files
with
1,506 additions
and
409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Configure | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
theme-python: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install PySide2 PySide6 PyQt5 PyQt6 | ||
- name: Checking our configuration scripts. | ||
run: | | ||
scripts/configure.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Linters | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint-version-python: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ["3.11", "3.12"] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pylint flake8 pyright | ||
- name: Analysing the code with pylint | ||
run: | | ||
scripts/lint.sh | ||
lint-os-python: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ["3.10"] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pylint flake8 pyright | ||
- name: Analysing the code with pylint | ||
run: | | ||
scripts/lint.sh | ||
lint-cpp: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] # TODO: Restore macos-latest | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install clang-tidy | ||
- name: Analysing the code with clang-tidy | ||
shell: bash | ||
run: | | ||
set -eux pipefail | ||
# Windows oddly requires C++20 support due to internal bugs. | ||
if [[ "${RUNNER_OS}" == "Windows" ]]; then | ||
extra_args="-extra-arg=-std=c++20" | ||
passthrough="" | ||
elif [[ "${RUNNER_OS}" == "macOS" ]]; then | ||
# NOTE: The search paths aren't added by default, and we need C then C++ by default | ||
# for our search. This makes the process easier. | ||
extra_args="-extra-arg=-std=c++17 -extra-arg=--stdlib=libc++" | ||
location="$(xcrun --show-sdk-path)" | ||
passthrough="-I${location}/usr/include/c++/v1 -I${location}/usr/include" | ||
else | ||
extra_args="-extra-arg=-std=c++17" | ||
passthrough="" | ||
fi | ||
clang-tidy -checks=-*,clang-analyzer-*,-clang-analyzer-cplusplus* ${extra_args} example/breeze_theme.hpp -- ${passthrough} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Theme | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
theme-python: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ["3.10"] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
python -m pip install --upgrade pip | ||
if [[ "${RUNNER_OS}" == "Windows" ]]; then | ||
python -m pip install winrt-Windows.UI.ViewManagement winrt-Windows.UI | ||
fi | ||
- name: Checking our Python imports. | ||
run: | | ||
scripts/theme.sh | ||
theme-cpp: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] # TODO: Restore macos-latest | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Checking our C++ theme detection. | ||
shell: bash | ||
run: | | ||
mkdir -p dist | ||
cd dist | ||
if [[ "${RUNNER_OS}" == "macOS" ]]; then | ||
clang++ ../scripts/test_theme.cpp -o test_theme -std=c++17 | ||
./test_theme | ||
else | ||
g++ ../scripts/test_theme.cpp -o test_theme -std=c++17 | ||
./test_theme | ||
fi | ||
theme-cpp-windows: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
- name: Checking our C++ theme detection. | ||
run: | | ||
mkdir dist -ErrorAction SilentlyContinue | ||
cd dist | ||
cl ..\scripts\test_theme.cpp /std:c++17 /EHsc /link Advapi32.lib OleAut32.lib | ||
.\test_theme.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Ui | ||
|
||
on: [workflow_dispatch] | ||
|
||
jobs: | ||
ui: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install PySide2 PySide6 PyQt5 PyQt6 | ||
sudo apt-get update | ||
sudo apt-get install xvfb | ||
sudo apt-get install build-essential libgl1-mesa-dev libgstreamer-gl1.0-0 libpulse-dev \ | ||
libxcb-glx0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 \ | ||
libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb-util1 libxcb-xfixes0 \ | ||
libxcb-xinerama0 libxcb1 libxkbcommon-dev libxkbcommon-x11-0 libxcb-xkb-dev | ||
- name: Checking our Python imports. | ||
run: | | ||
scripts/headless.sh |
Oops, something went wrong.