diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 118ddf3bb6f..59e887e29eb 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -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' }} diff --git a/.github/workflows/lint-code.yml b/.github/workflows/lint-code.yml new file mode 100644 index 00000000000..bef9df617de --- /dev/null +++ b/.github/workflows/lint-code.yml @@ -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 diff --git a/.github/workflows/lintcommits.yml b/.github/workflows/lint-commits.yml similarity index 99% rename from .github/workflows/lintcommits.yml rename to .github/workflows/lint-commits.yml index b0dc9fa33de..966102e9dfe 100644 --- a/.github/workflows/lintcommits.yml +++ b/.github/workflows/lint-commits.yml @@ -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'