From 31722964623eea3122cd18906508ddb564febc8a Mon Sep 17 00:00:00 2001 From: Ariya Hidayat Date: Wed, 13 May 2020 02:43:22 -0700 Subject: [PATCH] Switch CI to Github Actions (#15403) --- .github/workflows/tests.yml | 52 +++++++++++++++++++++ azure-pipelines.yml | 90 ------------------------------------- 2 files changed, 52 insertions(+), 90 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 azure-pipelines.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000000..dfbea9e089 --- /dev/null +++ b/.github/workflows/tests.yml @@ -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 + diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index e5196045a6..0000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -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'