From 59678650283b0a596560ca8e3c41260bc9684ada Mon Sep 17 00:00:00 2001 From: vit9696 Date: Sun, 22 Nov 2020 12:20:27 +0300 Subject: [PATCH] Switch CI to GitHub Actions --- .github/workflows/main.yml | 138 +++++++++++++++++++++++++++++++++++++ .travis.yml | 78 --------------------- 2 files changed, 138 insertions(+), 78 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..c6fb778 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,138 @@ +name: CI + +on: + push: + pull_request: + workflow_dispatch: + release: + types: [published] + +jobs: + build_mac: + name: Build on macOS + runs-on: macos-10.15 + steps: + - uses: actions/checkout@v2 + - run: ./unixbuild.sh + - name: Upload to artifacts + uses: actions/upload-artifact@v2 + with: + name: macOS builds + path: dist/*.zip + - name: Upload to releases + if: github.event_name == 'release' + uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: dist/*.zip + tag: ${{ github.ref }} + file_glob: true + + build_linux: + name: Build on Linux + runs-on: ubuntu-16.04 + steps: + - uses: actions/checkout@v2 + - name: Get Qt + run: sudo apt-get install -qq qt5-default qt5-qmake qtbase5-dev-tools cmake + - run: ./unixbuild.sh + - name: Upload to artifacts + uses: actions/upload-artifact@v2 + with: + name: Linux builds + path: dist/*.zip + - name: Upload to releases + if: github.event_name == 'release' + uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: dist/*.zip + tag: ${{ github.ref }} + file_glob: true + + build_win_extract: + name: Build on Windows + runs-on: windows-2016 + steps: + - uses: actions/checkout@v2 + + - name: Get Qt + uses: actions/checkout@v2 + with: + repository: LongSoft/qt-5.6.3-static-x86-msvc2017 + path: qt + lfs: true + - name: Unpack Qt + shell: bash + working-directory: qt + run: 7z x qt-5.6.3-static-x86-msvc2017.7z -o../.. + - name: Create dist directory + shell: bash + run: mkdir dist + + - name: Create UEFIExtract build directory + run: cmake -E make_directory ${{runner.workspace}}/build/UEFIExtract + - name: Configure UEFIExtract + shell: bash + working-directory: ${{runner.workspace}}/build/UEFIExtract + run: cmake -G "Visual Studio 15 2017" -T "v141_xp" -DU_STATIC_RT=YES ../../UEFITool/UEFIExtract/ + - name: Build UEFIExtract + working-directory: ${{runner.workspace}}/build/UEFIExtract + shell: bash + run: cmake --build . --config Release + - name: Archive UEFIExtract + working-directory: ${{runner.workspace}}/build/UEFIExtract/Release + shell: bash + run: | + UEFITOOL_VER=$(cat ../../../UEFITool/version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \ + 7z a ../../../UEFITool/dist/UEFIExtract_NE_${UEFITOOL_VER}_win32.zip UEFIExtract.exe + + - name: Create UEFIFind build directory + run: cmake -E make_directory ${{runner.workspace}}/build/UEFIFind + - name: Configure UEFIFind + shell: bash + working-directory: ${{runner.workspace}}/build/UEFIFind + run: cmake -G "Visual Studio 15 2017" -T "v141_xp" -DU_STATIC_RT=YES ../../UEFITool/UEFIFind/ + - name: Build UEFIFind + working-directory: ${{runner.workspace}}/build/UEFIFind + shell: bash + run: cmake --build . --config Release + - name: Archive UEFIFind + working-directory: ${{runner.workspace}}/build/UEFIFind/Release + shell: bash + run: | + UEFITOOL_VER=$(cat ../../../UEFITool/version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \ + 7z a ../../../UEFITool/dist/UEFIFind_NE_${UEFITOOL_VER}_win32.zip UEFIFind.exe + + - name: Create UEFITool build directory + run: cmake -E make_directory ${{runner.workspace}}/build/UEFITool + - name: Configure UEFITool + shell: bash + working-directory: ${{runner.workspace}}/build/UEFITool + run: ../../qt-5.6.3-static-x86-msvc2017/bin/qmake.exe ../../UEFITool/UEFITool/ + - name: Build UEFITool + working-directory: ${{runner.workspace}}/build/UEFITool + shell: cmd + run: | + call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars32.bat" + nmake release + - name: Archive UEFITool + working-directory: ${{runner.workspace}}/build/UEFITool/release + shell: bash + run: | + UEFITOOL_VER=$(cat ../../../UEFITool/version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \ + 7z a ../../../UEFITool/dist/UEFITool_NE_${UEFITOOL_VER}_win32.zip UEFITool.exe + + - name: Upload to artifacts + uses: actions/upload-artifact@v2 + with: + name: Windows builds + path: dist/*.zip + - name: Windows to releases + if: github.event_name == 'release' + uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: dist/*.zip + tag: ${{ github.ref }} + file_glob: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0d86afa..0000000 --- a/.travis.yml +++ /dev/null @@ -1,78 +0,0 @@ -language: cpp - -env: - global: - secure: "cWSx7cf7dOyGzqY12imfKIF0G0ImcjChHLpWuDU4dfSl+BvPh8WURhQqwpPihFzA4j+Ob9IdgJdEINW4ZKs5Fqt9NqpqTbsGlv7xMeGSNMymlwzwrY63CU8td6z/ju8Tgvi9I7aHtrYCbi4RCw2vPRzBihgwXTzQg6LWFoVT+XQ=" - -matrix: - include: - - os: osx - osx_image: xcode9.2 - - compiler: clang - - script: - - ./unixbuild.sh - - deploy: - provider: releases - skip_cleanup: true - file: "dist/*.zip" - file_glob: true - api_key: - secure: "WjYd93lVLKHULBpUXS/WtGrkdXyAwxHOUnLJotyDmQipAQP5Ox7Kj12JwkSJGEmVOEdcbIQJyi0QxPjn1UYbYsAt6Op8zrjnYLS4G4fMdBtcxprWzid85uTW7oAAIFs7ygMVhpzxRKpu70yNb683vbThqNmaOu6RyG9aJOLtPAg=" - on: - tags: true - - - os: linux - dist: trusty - compiler: clang - - before_install: - - sudo apt-get update -qq - - sudo apt-get install -qq qt5-default qt5-qmake qtbase5-dev-tools cmake - - script: - - ./unixbuild.sh - - - os: linux - dist: trusty - compiler: gcc - - before_install: - - sudo apt-get update -qq - - sudo apt-get install -qq qt5-default qt5-qmake qtbase5-dev-tools cmake - - script: - - ./unixbuild.sh - - deploy: - provider: releases - skip_cleanup: true - file: "dist/*.zip" - file_glob: true - api_key: - secure: "WjYd93lVLKHULBpUXS/WtGrkdXyAwxHOUnLJotyDmQipAQP5Ox7Kj12JwkSJGEmVOEdcbIQJyi0QxPjn1UYbYsAt6Op8zrjnYLS4G4fMdBtcxprWzid85uTW7oAAIFs7ygMVhpzxRKpu70yNb683vbThqNmaOu6RyG9aJOLtPAg=" - on: - tags: true - - - os: linux - dist: trusty - compiler: clang - - before_install: - - sudo apt-get update -qq - - sudo apt-get install -qq qt5-default qt5-qmake qtbase5-dev-tools cmake - - script: - - echo "This script runs coverity..." - - addons: - coverity_scan: - project: - name: "LongSoft/UEFITool" - description: "UEFITool" - notification_email: $NOTIFICATION_EMAIL - build_command_prepend: "./unixbuild.sh --configure" - build_command: "./unixbuild.sh --build" - branch_pattern: new_engine