mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 15:10:19 +00:00
CI: Convert lint job to macOS and install swift-format
swift-format is only packaged for homebrew, Arch, and nixpkgs at the moment. Rather than installing swiftly and a swift toolchain, let's change the job to run on macOS.
This commit is contained in:
parent
951f4f0984
commit
2575cfb14c
Notes:
github-actions[bot]
2024-10-01 19:34:07 +00:00
Author: https://github.com/ADKaster Commit: https://github.com/LadybirdBrowser/ladybird/commit/2575cfb14ca Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1221 Reviewed-by: https://github.com/trflynn89
1 changed files with 11 additions and 14 deletions
25
.github/workflows/lint-code.yml
vendored
25
.github/workflows/lint-code.yml
vendored
|
@ -4,7 +4,7 @@ on: [ push, pull_request ]
|
|||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: macos-14
|
||||
if: always() && github.repository == 'LadybirdBrowser/ladybird'
|
||||
|
||||
steps:
|
||||
|
@ -15,23 +15,20 @@ jobs:
|
|||
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'
|
||||
brew install curl flake8 llvm@18 ninja shellcheck swift-format unzip
|
||||
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install clang-format-18 generate-ninja
|
||||
# Note: gn isn't available in homebrew :(
|
||||
# Corresponds to https://gn.googlesource.com/gn/+/225e90c5025bf74f41dbee60d9cde4512c846fe7
|
||||
curl -L -o gn-mac-arm64.zip "https://chrome-infra-packages.appspot.com/dl/gn/gn/mac-arm64/+/786UV5-XW0Bz6QnRFxKtnzTSVq0ta5AU1KXRJs-ZNwcC"
|
||||
unzip gn-mac-arm64.zip -d ${{ github.workspace }}/bin
|
||||
chmod +x ${{ github.workspace }}/bin/gn
|
||||
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
|
||||
echo -n "gn version: "
|
||||
${{ github.workspace}}/bin/gn --version
|
||||
|
||||
- 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
|
||||
run: npm install -g prettier@2.7.1
|
||||
|
||||
- name: Lint
|
||||
run: ${{ github.workspace }}/Meta/lint-ci.sh
|
||||
|
|
Loading…
Reference in a new issue