mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
CI: Restore the code linting job
Unlike in Serenity, let's just run this job once per PR rather than on every job. This lets us install fewer dependencies on the build-and-test pipelines.
This commit is contained in:
parent
56e9eb6f68
commit
7ecca42898
Notes:
sideshowbarker
2024-07-17 09:41:18 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/7ecca42898 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/184 Reviewed-by: https://github.com/circl-lastname
3 changed files with 41 additions and 9 deletions
9
.github/actions/setup/action.yml
vendored
9
.github/actions/setup/action.yml
vendored
|
@ -29,7 +29,7 @@ runs:
|
|||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install autoconf autoconf-archive automake ccache clang-18 clang++-18 clang-format-18 lld-18 gcc-13 g++-13 libstdc++-13-dev ninja-build unzip qt6-base-dev qt6-tools-dev-tools libqt6svg6-dev qt6-multimedia-dev libgl1-mesa-dev libpulse-dev libssl-dev libegl1-mesa-dev
|
||||
sudo apt-get install autoconf autoconf-archive automake ccache clang-18 clang++-18 lld-18 gcc-13 g++-13 libstdc++-13-dev ninja-build unzip qt6-base-dev qt6-tools-dev-tools libqt6svg6-dev qt6-multimedia-dev libgl1-mesa-dev libpulse-dev libssl-dev libegl1-mesa-dev
|
||||
|
||||
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100
|
||||
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 100
|
||||
|
@ -41,17 +41,12 @@ runs:
|
|||
rm ./wabt-1.0.35-ubuntu-20.04.tar.gz
|
||||
echo "${{ github.workspace }}/wabt-1.0.35/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: 'Install JS dependencies'
|
||||
if: ${{ inputs.os == 'Linux' }}
|
||||
shell: bash
|
||||
run: sudo npm install -g prettier@2.7.1
|
||||
|
||||
- name: 'Install Python dependencies'
|
||||
if: ${{ inputs.os == 'Linux' }}
|
||||
shell: bash
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
pip3 install flake8 requests six
|
||||
pip3 install requests six
|
||||
|
||||
- name: 'Install Dependencies'
|
||||
if: ${{ inputs.os == 'macOS' || inputs.os == 'Android' }}
|
||||
|
|
37
.github/workflows/lint-code.yml
vendored
Normal file
37
.github/workflows/lint-code.yml
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
name: Lint Code
|
||||
|
||||
on: [ push, pull_request ]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-22.04
|
||||
if: always() && github.repository == 'LadybirdBrowser/ladybird'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set Up Environment
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main'
|
||||
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install clang-format-18 generate-ninja
|
||||
|
||||
- name: Install JS Dependencies
|
||||
shell: bash
|
||||
run: sudo npm install -g prettier@2.7.1
|
||||
|
||||
- name: Install Python Dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
pip3 install flake8
|
||||
|
||||
- name: Lint
|
||||
run: ${{ github.workspace }}/Meta/lint-ci.sh
|
|
@ -1,4 +1,4 @@
|
|||
name: Commit linter
|
||||
name: Lint Commit Messages
|
||||
|
||||
on: [pull_request_target]
|
||||
|
||||
|
@ -6,7 +6,7 @@ on: [pull_request_target]
|
|||
# (… but don't accept overlong 'fixup!' commit descriptions.)
|
||||
|
||||
jobs:
|
||||
lint_commits:
|
||||
lint:
|
||||
runs-on: ubuntu-22.04
|
||||
if: always() && github.repository == 'LadybirdBrowser/ladybird'
|
||||
|
Loading…
Reference in a new issue