From ec0045c0088e9b32b7dfa55970ba0d18760ab13b Mon Sep 17 00:00:00 2001 From: Ariel Abreu Date: Thu, 30 Apr 2020 14:35:12 -0400 Subject: [PATCH] Setup CircleCI (#769) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Translatation of Github Actions config to CircleCI config * Uses Clang 9 to build * Removes Github Actions workflow Co-authored-by: Luboš Doležel --- .circleci/config.yml | 59 ++++++++++++++++++++++++++++++++ .github/workflows/ccpp.yml | 56 ------------------------------ debian/control | 2 +- src/dyld/dyld3/MachOAnalyzer.cpp | 2 +- 4 files changed, 61 insertions(+), 58 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 .github/workflows/ccpp.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..256150403 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,59 @@ +version: 2.1 +orbs: + git-shallow-clone: guitarrapc/git-shallow-clone@2.0.3 +jobs: + build: + machine: + image: 'ubuntu-1604:202004-01' + steps: + - git-shallow-clone/checkout + - run: + name: Checkout submodules + command: | + git submodule sync + git submodule update --init --recursive --depth=1 + - run: + name: Install dependencies + command: | + # keys + wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add - + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + + # repos + sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ xenial main' + sudo apt-add-repository 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main' + sudo add-apt-repository ppa:deadsnakes/ppa + + sudo dpkg --add-architecture i386 + + sudo apt-get update + sudo apt-get upgrade -y cmake + sudo apt-get install --no-install-recommends -y devscripts equivs debhelper libdistro-info-perl python3.8 clang-9 + sudo mk-build-deps -i -r -t "apt-get --no-install-recommends -y" debian/control + + sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 + sudo update-alternatives --auto python3 + - run: + name: Build DSCs + no_output_timeout: 30m + command: | + export DEB_DISTRO=$(lsb_release -cs) + tools/makedeb --dsc + - run: + name: Move DSCs + command: mkdir source && mv ../*~$(lsb_release -cs).* source + - run: + name: Build DEBs + no_output_timeout: 30m + command: | + export DEB_DISTRO=$(lsb_release -cs) + tools/makedeb + - run: + name: Move DEBs + command: mkdir dist && mv ../*.deb dist + - store_artifacts: + path: dist/ + destination: debs + - store_artifacts: + path: source/ + destination: source diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml deleted file mode 100644 index 6f767632d..000000000 --- a/.github/workflows/ccpp.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Darling CI - -on: [push] - -jobs: - build-deb: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Checkout Submodules - shell: bash - run: | - # If your submodules are configured to use SSH instead of HTTPS please uncomment the following line - # git config --global url."https://github.com/".insteadOf "git@github.com:" - git remote set-url origin https://github.com/darlinghq/darling.git - auth_header="$(git config --local --get http.https://github.com/.extraheader)" - git submodule sync --recursive - git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 - - name: Install Dependencies - run: | - sudo apt-get update && sudo apt-get install devscripts equivs debhelper - sudo mk-build-deps -ir - - name: Build DEB - run: tools/makedeb - - name: Move DEBs - run: mkdir dist && mv ../*.deb dist - - name: Upload Artifacts - uses: actions/upload-artifact@v1 - with: - name: 'debs' - path: dist/ - - build-dsc: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Checkout Submodules - shell: bash - run: | - # If your submodules are configured to use SSH instead of HTTPS please uncomment the following line - # git config --global url."https://github.com/".insteadOf "git@github.com:" - git remote set-url origin https://github.com/darlinghq/darling.git - auth_header="$(git config --local --get http.https://github.com/.extraheader)" - git submodule sync --recursive - git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 - - name: Install Dependencies - run: sudo apt-get update && sudo apt-get install devscripts dpkg-dev debhelper - - name: Build DSC - run: tools/makedeb --dsc - - name: Move DSCs - run: mkdir source && mv ../*~testing.* source - - name: Upload Artifacts - uses: actions/upload-artifact@v1 - with: - name: 'source' - path: source/ diff --git a/debian/control b/debian/control index cde1b1809..88fe103b4 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Maintainer: Lubos Dolezel Section: misc Priority: optional Standards-Version: 4.4.0 -Build-Depends: cmake, clang, bison, flex, libfuse-dev, libudev-dev, pkg-config, libc6-dev-i386, linux-headers-amd64|linux-headers-generic, gcc-multilib, libcairo2-dev, libgl1-mesa-dev, libtiff5-dev, libfreetype6-dev, libelf-dev, libxml2-dev, libegl1-mesa-dev, libfontconfig1-dev, libbsd-dev, debhelper, ninja-build, python, libxrandr-dev, libxcursor-dev, libgif-dev, libavcodec-dev, libavformat-dev, libavresample-dev, libavutil-dev, libpulse-dev, libavformat-dev, libavcodec-dev, libavresample-dev, libdbus-1-dev +Build-Depends: cmake, clang | clang-9, bison, flex, libfuse-dev, libudev-dev, pkg-config, libc6-dev-i386, linux-headers-amd64|linux-headers-generic, gcc-multilib, libcairo2-dev, libgl1-mesa-dev, libtiff5-dev, libfreetype6-dev, libelf-dev, libxml2-dev, libegl1-mesa-dev, libfontconfig1-dev, libbsd-dev, debhelper, ninja-build, python, libxrandr-dev, libxcursor-dev, libgif-dev, libavcodec-dev, libavformat-dev, libavresample-dev, libavutil-dev, libpulse-dev, libavformat-dev, libavcodec-dev, libavresample-dev, libdbus-1-dev, libfreetype6-dev:i386 Package: darling Architecture: amd64 diff --git a/src/dyld/dyld3/MachOAnalyzer.cpp b/src/dyld/dyld3/MachOAnalyzer.cpp index ec3b8d7ab..a8183c054 100644 --- a/src/dyld/dyld3/MachOAnalyzer.cpp +++ b/src/dyld/dyld3/MachOAnalyzer.cpp @@ -3316,7 +3316,7 @@ bool MachOAnalyzer::SectionCache::findSectionForVMAddr(uint64_t vmAddr, bool (^s // The section handler may also reject this section if ( sectionHandler != nullptr ) { if (!sectionHandler(*foundSectionInfo)) { - return nullptr; + return false; } } -- 2.51.2