mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-22 07:58:22 +08:00
Attempt to integrate static analysis
This commit is contained in:
parent
8932aebc02
commit
3e1afd1e00
26
.travis.yml
26
.travis.yml
@ -1,4 +1,9 @@
|
||||
language: cpp
|
||||
|
||||
env:
|
||||
global:
|
||||
secure: "cWSx7cf7dOyGzqY12imfKIF0G0ImcjChHLpWuDU4dfSl+BvPh8WURhQqwpPihFzA4j+Ob9IdgJdEINW4ZKs5Fqt9NqpqTbsGlv7xMeGSNMymlwzwrY63CU8td6z/ju8Tgvi9I7aHtrYCbi4RCw2vPRzBihgwXTzQg6LWFoVT+XQ="
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: osx
|
||||
@ -50,3 +55,24 @@ matrix:
|
||||
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: "NOBUILD=1 ./unixbuild.sh"
|
||||
build_command: "PRECONFIGURED=1 ./unixbuild.sh"
|
||||
branch_pattern: new_engine
|
||||
|
@ -3,7 +3,7 @@
|
||||
UEFITool is a viewer and editor of firmware images conforming to UEFI Platform Interface (PI) Specifications.
|
||||
|
||||
![UEFITool icon](https://raw.githubusercontent.com/LongSoft/UEFITool/new_engine/UEFITool/icons/uefitool_64x64.png "UEFITool icon")
|
||||
![Coverity badge](https://scan.coverity.com/projects/1812/badge.svg?flat=1 "Coverity badge")
|
||||
[![Build Status](https://travis-ci.org/LongSoft/UEFITool.svg?branch=master)](https://travis-ci.org/LongSoft/UEFITool) [![Scan Status](https://scan.coverity.com/projects/17209/badge.svg?flat=1)](https://scan.coverity.com/projects/17209)
|
||||
|
||||
|
||||
## Very Brief Introduction to UEFI
|
||||
|
58
unixbuild.sh
58
unixbuild.sh
@ -70,39 +70,43 @@ build_tool() {
|
||||
cd "$1" || exit 1
|
||||
|
||||
# Build
|
||||
if [ "$3" != "" ]; then
|
||||
# -flto is flawed on CI atm
|
||||
if [ "$UPLATFORM" = "mac" ]; then
|
||||
qmake $3 QMAKE_CXXFLAGS+=-flto QMAKE_LFLAGS+=-flto CONFIG+=optimize_size || exit 1
|
||||
elif [ "$UPLATFORM" = "win32" ]; then
|
||||
qmake $3 QMAKE_CXXFLAGS="-static -flto -Os" QMAKE_LFLAGS="-static -flto -Os" CONFIG+=optimize_size CONFIG+=staticlib CONFIG+=static || exit 1
|
||||
if [ "$PRECONFIGURED" != "1" ]; then
|
||||
if [ "$3" != "" ]; then
|
||||
# -flto is flawed on CI atm
|
||||
if [ "$UPLATFORM" = "mac" ]; then
|
||||
qmake $3 QMAKE_CXXFLAGS+=-flto QMAKE_LFLAGS+=-flto CONFIG+=optimize_size || exit 1
|
||||
elif [ "$UPLATFORM" = "win32" ]; then
|
||||
qmake $3 QMAKE_CXXFLAGS="-static -flto -Os" QMAKE_LFLAGS="-static -flto -Os" CONFIG+=optimize_size CONFIG+=staticlib CONFIG+=static || exit 1
|
||||
else
|
||||
qmake $3 CONFIG+=optimize_size || exit 1
|
||||
fi
|
||||
else
|
||||
qmake $3 CONFIG+=optimize_size || exit 1
|
||||
fi
|
||||
else
|
||||
if [ "$UPLATFORM" = "mac" ]; then
|
||||
cmake -G "Unix Makefiles" -DCMAKE_CXX_FLAGS="-stdlib=libc++ -flto -Os -mmacosx-version-min=10.7" -DCMAKE_C_FLAGS="-flto -Os -mmacosx-version-min=10.7" || exit 1
|
||||
elif [ "$UPLATFORM" = "win32" ]; then
|
||||
cmake -G "Unix Makefiles" -DCMAKE_CXX_FLAGS="-static -Os" -DCMAKE_C_FLAGS="-static -Os" || exit 1
|
||||
else
|
||||
cmake -G "Unix Makefiles" -DCMAKE_CXX_FLAGS="-Os" -DCMAKE_C_FLAGS="-Os" || exit 1
|
||||
if [ "$UPLATFORM" = "mac" ]; then
|
||||
cmake -G "Unix Makefiles" -DCMAKE_CXX_FLAGS="-stdlib=libc++ -flto -Os -mmacosx-version-min=10.7" -DCMAKE_C_FLAGS="-flto -Os -mmacosx-version-min=10.7" || exit 1
|
||||
elif [ "$UPLATFORM" = "win32" ]; then
|
||||
cmake -G "Unix Makefiles" -DCMAKE_CXX_FLAGS="-static -Os" -DCMAKE_C_FLAGS="-static -Os" || exit 1
|
||||
else
|
||||
cmake -G "Unix Makefiles" -DCMAKE_CXX_FLAGS="-Os" -DCMAKE_C_FLAGS="-Os" || exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
make || exit 1
|
||||
if [ "$NOBUILD" != "1" ]; then
|
||||
make || exit 1
|
||||
|
||||
# Move the binary out of the dir
|
||||
if [ "$UPLATFORM" = "win32" ] && [ -f "release/${1}${BINSUFFIX}" ]; then
|
||||
mv "release/${1}${BINSUFFIX}" "${1}${BINSUFFIX}" || exit 1
|
||||
fi
|
||||
# Move the binary out of the dir
|
||||
if [ "$UPLATFORM" = "win32" ] && [ -f "release/${1}${BINSUFFIX}" ]; then
|
||||
mv "release/${1}${BINSUFFIX}" "${1}${BINSUFFIX}" || exit 1
|
||||
fi
|
||||
|
||||
# Archive
|
||||
if [ "$1" = "UEFITool" ] && [ "$UPLATFORM" = "mac" ]; then
|
||||
strip -x UEFITool.app/Contents/MacOS/UEFITool || exit 1
|
||||
zip -qry ../dist/"${1}_NE_${2}_${UPLATFORM}.zip" UEFITool.app ${4} || exit 1
|
||||
else
|
||||
strip -x "${1}${BINSUFFIX}" || exit 1
|
||||
zip -qry ../dist/"${1}_NE_${2}_${UPLATFORM}.zip" "${1}${BINSUFFIX}" ${4} || exit 1
|
||||
# Archive
|
||||
if [ "$1" = "UEFITool" ] && [ "$UPLATFORM" = "mac" ]; then
|
||||
strip -x UEFITool.app/Contents/MacOS/UEFITool || exit 1
|
||||
zip -qry ../dist/"${1}_NE_${2}_${UPLATFORM}.zip" UEFITool.app ${4} || exit 1
|
||||
else
|
||||
strip -x "${1}${BINSUFFIX}" || exit 1
|
||||
zip -qry ../dist/"${1}_NE_${2}_${UPLATFORM}.zip" "${1}${BINSUFFIX}" ${4} || exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Return to parent
|
||||
|
Loading…
Reference in New Issue
Block a user