Skip to content

Commit f4fc578

Browse files
committed
Enhance CI & platforms
1 parent 6448166 commit f4fc578

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2487
-524
lines changed

.appveyor.yml

+21-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ clone_folder: c:\projects\lief
44

55
configuration: Release
66

7+
services:
8+
- docker
9+
710
platform:
811
- x86
912
- x64
@@ -13,7 +16,7 @@ environment:
1316
secure: TT7SXISIifq2/tf02n2ATgPj+Ky4Cjl3Fg44BAfyI4yRa4i87UAQIx5EFeV63+Xv2rhcU7JcMgl+An7QBrV6ofuQ9jxbuw+Gd1GqcCrAIyY=
1417
LIEF_AUTOMATIC_BUILDS_IV:
1518
secure: /S6Vbt3vEisoC81siFbkqOXQeVnwxLZZPMYp1r79G7h+HFjLlWUZSidxxpsAgHNE
16-
SCCACHE_CACHE_SIZE: "250M"
19+
SCCACHE_CACHE_SIZE: "750M"
1720
SCCACHE_DIR: C:\Users\appveyor\AppData\Local\Mozilla\sccache
1821
SCCACHE_ERROR_LOG: C:\projects\sccache.log
1922
matrix:
@@ -89,12 +92,27 @@ install:
8992
build_script:
9093
- cd %APPVEYOR_BUILD_FOLDER%
9194
- set MSBuildLogger="C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
92-
- python.exe .\setup.py --ninja --sdk --lief-test bdist_wheel && exit 0 # Ignore warnings...
95+
- python.exe .\setup.py --ninja --lief-test build bdist_wheel --skip-build && exit 0 # Ignore warnings...
96+
- ps: if ($env:PYTHON_VERSION -eq "3.9") { python.exe .\scripts\windows\package_sdk.py }
9397

9498
after_build:
9599
- ps: Get-Service -Name 'ssh-agent' | Set-Service -StartupType Manual
96100
- ps: Start-Service -Name 'ssh-agent'
97-
- bash ./.github/deploy.sh
101+
- cd %APPVEYOR_BUILD_FOLDER%
102+
- ps: docker pull liefproject/deploy:latest
103+
- ps: |
104+
docker run `
105+
-v ${PWD}:/src `
106+
-e APPVEYOR="true" `
107+
-e APPVEYOR_PULL_REQUEST_NUMBER="$env:APPVEYOR_PULL_REQUEST_NUMBER" `
108+
-e APPVEYOR_REPO_NAME="$env:APPVEYOR_REPO_NAME" `
109+
-e APPVEYOR_REPO_BRANCH="$env:APPVEYOR_REPO_BRANCH" `
110+
-e APPVEYOR_BUILD_FOLDER="$env:APPVEYOR_BUILD_FOLDER" `
111+
-e LIEF_AUTOMATIC_BUILDS_KEY="$env:LIEF_AUTOMATIC_BUILDS_KEY" `
112+
-e LIEF_AUTOMATIC_BUILDS_IV="$env:LIEF_AUTOMATIC_BUILDS_IV" `
113+
--rm `
114+
liefproject/deploy python3 /src/.github/deploy.py
115+
$host.SetShouldExit(0)
98116
99117
on_finish:
100118
- cmd: sccache.exe --stop-server

.circleci/config.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
version: 2.1
2+
jobs:
3+
build:
4+
macos:
5+
xcode: 12.3.0
6+
steps:
7+
- checkout:
8+
path: ~/LIEF
9+
- restore_cache:
10+
keys:
11+
- ccache-{{ arch }}-{{ .Branch }}
12+
- ccache-{{ arch }}-master
13+
- ccache-{{ arch }}
14+
- pyenv
15+
- run:
16+
name: Install pyenv
17+
command: |
18+
brew install pyenv
19+
pyenv root
20+
pyenv install --list
21+
- run:
22+
name: Install ccache
23+
command: brew install ccache
24+
- run:
25+
name: Install ninja
26+
command: brew install ninja
27+
- run:
28+
name: CCache initialization
29+
command: |
30+
ccache --show-stats
31+
ccache --zero-stats
32+
ccache --max-size=10.0G
33+
ccache --set-config=compiler_check=content
34+
- run:
35+
name: LIEF build setup
36+
command: |
37+
export PYTHON_CONFIGURE_OPTS="--enable-shared --enable-unicode=ucs2"
38+
pyenv install --skip-existing 3.9.0
39+
export PYTHON_BINARY=$(pyenv root)/versions/3.9.0/bin/python3.9
40+
$PYTHON_BINARY -m pip install --upgrade pip setuptools wheel
41+
$PYTHON_BINARY ./setup.py --ninja --lief-test build bdist_wheel
42+
bash scripts/osx/package_sdk.sh
43+
- run:
44+
name: LIEF deploy
45+
command: |
46+
export PYTHON_BINARY=$(pyenv root)/versions/3.9.0/bin/python3.9
47+
$PYTHON_BINARY -m pip install --upgrade requests mako
48+
$PYTHON_BINARY .github/deploy.py
49+
- run:
50+
name: ccache stats
51+
when: always
52+
command: |
53+
ccache --show-stats
54+
- save_cache:
55+
key: 'ccache-{{ arch }}-{{ .Branch }}'
56+
paths: [ "/home/circleci/.ccache" ]
57+
- save_cache:
58+
key: 'pyenv'
59+
paths: [ "/home/circleci/.pyenv" ]
60+
61+
62+

0 commit comments

Comments
 (0)