Skip to content

Commit

Permalink
merged RC_2_0 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Jul 21, 2024
2 parents 4c524b7 + d3eef89 commit b1fd3ed
Show file tree
Hide file tree
Showing 16 changed files with 92 additions and 156 deletions.
96 changes: 17 additions & 79 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# since CirrusCI has limited compute resources for free open-source projects
# we only use it for its unique feature, FreeBSD images

freebsd_instance:
image_family: freebsd-14-0

task:
env:
CIRRUS_CLONE_DEPTH: 1
CIRRUS_CLONE_SUBMODULES: true
CIBW_BUILD_VERBOSITY: 3
CIBW_SKIP: pp* cp38-* # cp38-* has problem with x86_64 / arm64 confusion
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-*
install_script: |
IGNORE_OSVERSION=yes pkg update
pkg install -U -y git boost-build boost-libs unzip wget openssl cmake ninja
pkg install -y boost-build boost-libs openssl cmake ninja py311-pip
echo "using clang ;" > ~/user-config.jam
submodules_script: |
git submodule update --init --recursive
build_cmake_script: |
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_CXX_STANDARD=17 -Dbuild_tests=ON -Dbuild_examples=ON -Dbuild_tools=ON -Dpython-bindings=OFF -G Ninja .
cmake --build . --parallel 2
Expand All @@ -19,79 +25,11 @@ task:
cd test
b2 -l250 warnings-as-errors=on warnings=all crypto=openssl stage_enum_if stage_dependencies include=/usr/local/include library-path=/usr/local/lib
LD_LIBRARY_PATH=./dependencies ./enum_if
# it appears cibuildwheel does not support FreeBSD (nor CirrusCI)
# install_cibuildwheel_script:
# - python -m pip install cibuildwheel==2.16.5
# run_cibuildwheel_script:
# - cibuildwheel
# wheels_artifacts:
# path: "wheelhouse/*"

build_and_store_wheels: &BUILD_AND_STORE_WHEELS
env:
CIBW_BUILD_VERBOSITY: 3
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
delocate-listdeps {wheel} &&
delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
install_cibuildwheel_script:
- $PYTHON -m pip install cibuildwheel==2.16.5

run_cibuildwheel_script:
- cibuildwheel

wheels_artifacts:
path: "wheelhouse/*"

build_macos_arm64_task:
name: Build macOS arm64 wheels.

macos_instance:
image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest

env:
CIRRUS_CLONE_SUBMODULES: true
CIBW_SKIP: pp* cp38-* # cp38-* has problem with x86_64 / arm64 confusion
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-*
CIBW_ARCH: arm64
PATH: /opt/homebrew/bin:$PATH
PYTHON: python3.9

install_pre_requirements_script:
- brew install [email protected]

debug_script:
- echo $PATH
- ls -l /opt/homebrew/bin
- find /opt/homebrew -name '*openssl*' -ls

<<: *BUILD_AND_STORE_WHEELS

test_macos_arm64_task:
name: Test macOS arm64.

macos_instance:
image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest

env:
CIRRUS_CLONE_SUBMODULES: true
PATH: /opt/homebrew/bin:$PATH
PYTHON: python3.9
OPENSSL_OPTS: >
openssl-lib=/opt/homebrew/opt/[email protected]/lib
openssl-include=/opt/homebrew/opt/[email protected]/include
install_pre_requirements_script:
- brew install [email protected]
- brew install boost-build boost [email protected]
- echo "using darwin ;" >>~/user-config.jam

debug_script:
- echo $PATH
- ls -l /opt/homebrew/bin
- find /opt/homebrew -name '*openssl*' -ls

test_script:
- cd test
- b2 crypto=built-in -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on deterministic-tests
- b2 $OPENSSL_OPTS crypto=openssl -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on deterministic-tests
- b2 $OPENSSL_OPTS deprecated-functions=off -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on deterministic-tests

test_flaky_script:
- cd test
- b2 crypto=built-in -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on
- b2 $OPENSSL_OPTS crypto=openssl -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on
- b2 $OPENSSL_OPTS deprecated-functions=off -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on
2 changes: 2 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
filter: tree:0

- name: install boost
run: |
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ jobs:
MATRIX_PULL_REQUEST: |
{
"include": [
{"os": "ubuntu-latest", "CIBW_BUILD": "cp37-manylinux_*", "CIBW_ARCHS": "x86_64"},
{"os": "ubuntu-latest", "CIBW_BUILD": "cp37-musllinux_*", "CIBW_ARCHS": "x86_64"},
{"os": "macos-12", "CIBW_BUILD": "cp37-*", "CIBW_ARCHS": "x86_64"},
{"os": "windows-2022", "CIBW_BUILD": "cp37-*", "CIBW_ARCHS": "AMD64"}
{"os": "ubuntu-latest", "CIBW_BUILD": "cp39-manylinux_*", "CIBW_ARCHS": "x86_64"},
{"os": "ubuntu-latest", "CIBW_BUILD": "cp39-musllinux_*", "CIBW_ARCHS": "x86_64"},
{"os": "macos-12", "CIBW_BUILD": "cp39-*", "CIBW_ARCHS": "x86_64"},
{"os": "windows-2022", "CIBW_BUILD": "cp39-*", "CIBW_ARCHS": "AMD64"}
]
}
MATRIX_WORKFLOW_DISPATCH: |
Expand Down Expand Up @@ -94,6 +94,8 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
filter: tree:0

- uses: actions/cache@v4
id: cache-wheel
Expand All @@ -104,7 +106,7 @@ jobs:
- uses: docker/setup-qemu-action@v3
if: steps.cache-wheel.outputs.cache-hit != 'true' && runner.os == 'Linux'

- uses: pypa/cibuildwheel@v2.17.0
- uses: pypa/cibuildwheel@v2.19.2
if: steps.cache-wheel.outputs.cache-hit != 'true'

- uses: actions/upload-artifact@v3
Expand Down
18 changes: 5 additions & 13 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,15 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1
filter: tree:0

- name: Install Packages (cpp)
if: ${{ matrix.language == 'cpp' }}
run: |
sudo apt-get update
sudo apt-get install --yes libboost-all-dev libssl-dev ninja-build
- name: After Prepare (cpp)
if: ${{ matrix.language == 'cpp' }}
run: 'wget -q "https://github.com/Kitware/CMake/releases/download/v3.21.2/cmake-3.21.2-linux-x86_64.tar.gz"
tar xzf cmake-3.21.2-linux-x86_64.tar.gz
'

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
Expand All @@ -50,11 +44,9 @@ jobs:

- name: Build cpp
if: ${{ matrix.language == 'cpp' }}
run: './cmake-3.21.2-linux-x86_64/bin/cmake -Dbuild_examples=ON -Dbuild_tests=ON -Dbuild_tools=ON -GNinja .
./cmake-3.21.2-linux-x86_64/bin/cmake --build .
'
run: |
cmake -Dbuild_examples=ON -Dbuild_tests=ON -Dbuild_tools=ON -GNinja .
cmake --build .
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
filter: tree:0

- name: update package lists
continue-on-error: true
Expand Down
26 changes: 23 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ concurrency:
jobs:

pre-commit:
# TODO: matrix across python version and os
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1
filter: tree:0

- uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.10"
- uses: pre-commit/[email protected]

build:
Expand All @@ -30,13 +32,19 @@ jobs:

strategy:
matrix:
config: [ asio-debugging=on picker-debugging=on, extensions=off logging=off streaming=off super-seeding=off share-mode=off predictive-pieces=off dht=off alert-msg=off encryption=off mutable-torrents=off deprecated-functions=off, crypto=gcrypt, mmap-disk-io=off ]
include:
- config: asio-debugging=on picker-debugging=on
- config: extensions=off logging=off streaming=off super-seeding=off share-mode=off predictive-pieces=off dht=off alert-msg=off encryption=off mutable-torrents=off deprecated-functions=off
- config: crypto=gcrypt
- config: mmap-disk-io=off

steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
filter: tree:0

- name: update package lists
continue-on-error: true
Expand Down Expand Up @@ -90,6 +98,8 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
filter: tree:0

- name: update package lists
continue-on-error: true
Expand Down Expand Up @@ -129,6 +139,8 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
filter: tree:0

- name: update package lists
continue-on-error: true
Expand Down Expand Up @@ -162,6 +174,8 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
filter: tree:0

- name: update package lists
continue-on-error: true
Expand Down Expand Up @@ -208,6 +222,8 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1
filter: tree:0

- name: update package lists
continue-on-error: true
Expand Down Expand Up @@ -267,6 +283,8 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
filter: tree:0

- name: update package lists
continue-on-error: true
Expand Down Expand Up @@ -309,6 +327,8 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
filter: tree:0

- name: update package lists
continue-on-error: true
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1
filter: tree:0

- uses: Chocobo1/setup-ccache-action@v1
with:
Expand Down Expand Up @@ -67,6 +69,8 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
filter: tree:0

- uses: Chocobo1/setup-ccache-action@v1
with:
Expand Down Expand Up @@ -99,6 +103,8 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
filter: tree:0

- uses: Chocobo1/setup-ccache-action@v1
with:
Expand Down Expand Up @@ -126,6 +132,8 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
filter: tree:0

- name: install boost
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
filter: tree:0

# Note:
# - on mac and linux images, 'python' is python2 and 'python3' is
Expand Down
Loading

0 comments on commit b1fd3ed

Please sign in to comment.