1
1
mirror of https://github.com/ariya/phantomjs.git synced 2024-09-11 12:55:33 +03:00

Switch CI to Github Actions (#15403)

This commit is contained in:
Ariya Hidayat 2020-05-13 02:43:22 -07:00
parent da0ab54e1c
commit 3172296462
2 changed files with 52 additions and 90 deletions

52
.github/workflows/tests.yml vendored Normal file
View File

@ -0,0 +1,52 @@
name: Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
codestyle:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- run: brew install clang-format
name: Install clang-format
- run: clang-format --version
- run: bash ./tools/format-code.sh
name: Run code formatter
- run: git diff --quiet HEAD
name: Check if the styling guide is followed
amd64_linux_clang:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- run: sudo apt -y -qq update
- run: sudo apt install -y clang cmake qt5-default libqt5webkit5-dev python
name: Install requirements
- run: clang++ --version && cmake --version && qmake --version && python --version
name: Display tools version
- run: CC=clang CXX=clang++ ./configure
- run: make
- run: file ./bin/phantomjs
- run: ./bin/phantomjs --version
- run: make check
amd64_linux_gcc:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- run: sudo apt -y -qq update
- run: sudo apt install -y g++ cmake qt5-default libqt5webkit5-dev python
name: Install requirements
- run: g++ --version && cmake --version && qmake --version && python --version
name: Display tools version
- run: ./configure
- run: make
- run: file ./bin/phantomjs
- run: ./bin/phantomjs --version
- run: make check

View File

@ -1,90 +0,0 @@
jobs:
- job: 'CodeQuality'
pool:
vmImage: 'macOS 10.13'
steps:
- script: brew install clang-format && clang-format --version
displayName: 'Install clang-format'
- script: bash ./tools/format-code.sh
displayName: 'Run code formatter'
- script: git diff --quiet HEAD
displayName: 'Check if the styling guide is followed'
- job: 'amd64_linux_gcc'
pool:
vmImage: 'ubuntu-18.04'
steps:
- script: sudo apt-get -y -qq update
displayName: 'apt-get update'
- script: sudo apt install -y g++ cmake qt5-default libqt5webkit5-dev python
displayName: 'Install requirements'
- script: g++ --version && cmake --version && qmake --version && python --version
displayName: 'Display tools version'
- script: ./configure
displayName: 'Run configure script'
- script: make
displayName: 'make'
- script: file ./bin/phantomjs && ./bin/phantomjs --version
displayName: 'Verify executable'
- script: make check
displayName: 'Run the tests'
- job: 'amd64_linux_clang'
pool:
vmImage: 'ubuntu-18.04'
steps:
- script: sudo apt-get -y -qq update
displayName: 'apt-get update'
- script: sudo apt install -y clang cmake qt5-default libqt5webkit5-dev python
displayName: 'Install requirements'
- script: clang++ --version && cmake --version && qmake --version && python --version
displayName: 'Display tools version'
- script: CC=clang CXX=clang++ ./configure
displayName: 'Run configure script'
- script: make
displayName: 'make'
- script: file ./bin/phantomjs && ./bin/phantomjs --version
displayName: 'Verify executable'
- script: make check
displayName: 'Run the tests'
- job: 'amd64_windows_mingw'
condition: eq(1, 2)
pool:
vmImage: 'vs2017-win2016'
variables:
PACMAN_PACKAGES: 'C:\tools\msys64\var\cache\pacman\pkg'
QT5_DIR: C:\tools\msys64\mingw64\lib\cmake
steps:
- script: choco install --no-progress msys2
displayName: 'Install MSYS2'
- task: Cache@2
inputs:
key: pacman
restoreKeys: pacman
path: $(PACMAN_PACKAGES)
displayName: Cache pacman packages
- script: pacman --version && pacman -Sy && pacman --noconfirm -S pacman-mirrors
workingDirectory: C:\tools\msys64\usr\bin\
displayName: 'Check pacman'
- script: C:\tools\msys64\usr\bin\pacman -Syu
displayName: 'Update MSYS2 packages'
- script: |
set PATH=C:\tools\msys64\usr\bin;%PATH%
pacman --noconfirm -S mingw64/mingw-w64-x86_64-toolchain
pacman --noconfirm -S mingw64/mingw-w64-x86_64-cmake
pacman --noconfirm -S mingw64/mingw-w64-x86_64-qtwebkit
pacman --noconfirm -S mingw64/mingw-w64-x86_64-python2
displayName: 'Install requirements'
- script: |
set PATH=C:\tools\msys64\usr\bin;C:\tools\msys64\mingw64\bin;%PATH%
g++ --version && cmake --version && qmake --version && python --version
displayName: 'Display tools version'
- script: |
set PATH=%PATH:C:\Program Files\Git\bin;=%
set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
set PATH=C:\tools\msys64\usr\bin;C:\tools\msys64\mingw64\bin;%PATH%
del C:\tools\msys64\usr\bin\sh.exe
cmake CMakeLists.txt -G "MinGW Makefiles"
displayName: 'Run CMake'