Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update libressl #18

Merged
merged 15 commits into from
Mar 6, 2024
63 changes: 63 additions & 0 deletions .github/actions/install-llvm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: "Install LLVM"
description: "Install LLVM"
inputs:
version:
description: "LLVM version"
required: false
default: "17"
packages:
description: "Packages to install"
required: false
default: >
clang-VERSION
clang-tools-VERSION
clang-format-VERSION
clang-tidy-VERSION
libc++-VERSION-dev
libc++abi-VERSION-dev
libclang-common-VERSION-dev
libclang-rt-VERSION-dev
libunwind-VERSION-dev
outputs:
version:
description: "LLVM version"
value: ${{ inputs.version }}
runs:
using: "composite"
steps:
- run: |
sudo apt-get install -qq --no-install-recommends \
apt-transport-https \
ca-certificates \
software-properties-common
wget -nv -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
source /etc/os-release
sudo add-apt-repository "deb http://apt.llvm.org/${VERSION_CODENAME}/ llvm-toolchain-${VERSION_CODENAME}-${{ inputs.version }} main"
sudo apt-get update
shell: bash
env:
DEBIAN_FRONTEND: noninteractive

# workaround for package conflicts
- run: |
sudo apt-get purge --auto-remove \
llvm \
llvm-14 \
python3-lldb-14 \
libc++-dev \
libc++1-14 \
libc++abi-dev \
libc++abi1-14 \
libc++abi-14-dev \
libunwind-14 \
libunwind-14-dev
shell: bash
env:
DEBIAN_FRONTEND: noninteractive

- run: >
sudo apt-get install -y --no-install-recommends
$(echo "${{ inputs.packages }}" | sed 's/VERSION/${{ inputs.version }}/g')
shell: bash
env:
DEBIAN_FRONTEND: noninteractive
50 changes: 22 additions & 28 deletions .github/workflows/unix.yml
Original file line number Diff line number Diff line change
@@ -11,17 +11,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install clang-format
env:
DEBIAN_FRONTEND: noninteractive
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 15
rm llvm.sh
sudo apt-get install -y --no-install-recommends clang-format-15
uses: ./.github/actions/install-llvm
with:
version: 15
packages: clang-format-15

- name: Format files
run: find src include example -type f -a \( -name "*.cc" -o -name "*.h" \) -print0 | xargs -0 clang-format-15 -i
@@ -44,15 +40,15 @@ jobs:
cxxflags: -stdlib=libc++
os: macos-latest
artifact: macos
- name: GCC 10 Release
cxx: g++-10
cc: gcc-10
- name: GCC 12 Release
cxx: g++-12
cc: gcc-12
mode: Release
os: ubuntu-latest
artifact: linux
- name: GCC 10 Debug
cxx: g++-10
cc: gcc-10
- name: GCC 12 Debug
cxx: g++-12
cc: gcc-12
mode: Debug
os: ubuntu-latest
- name: Clang 15 Release
@@ -73,20 +69,16 @@ jobs:
env:
UBSAN_OPTIONS: halt_on_error=1:abort_on_error=1
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master

# ==== INSTALL ====
- name: Install LLVM
if: matrix.config.os != 'macos-latest' && matrix.config.cc == 'clang-15'
env:
DEBIAN_FRONTEND: noninteractive
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 15
rm llvm.sh
sudo apt-get install -y --no-install-recommends libc++-15-dev libc++abi-15-dev clang-tidy-15
uses: ./.github/actions/install-llvm
with:
version: 15
packages: libc++-15-dev libc++abi-15-dev clang-tidy-15

# ==== BUILD ====
- name: CMake
@@ -97,11 +89,13 @@ jobs:
-DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
-DCMAKE_C_FLAGS="${{ matrix.config.cflags }}" \
-DCMAKE_CXX_FLAGS="${{ matrix.config.cxxflags }}" \
-DCMAKE_CXX_FLAGS_DEBUG="" \
-DCMAKE_CXX_LINKER_FLAGS=${{ matrix.config.ldflags }}" \
-DCMAKE_CXX_EXE_LINKER_FLAGS="${{ matrix.config.ldflags }} \
-DCMAKE_EXE_LINKER_FLAGS="${{ matrix.config.ldflags }}" \
-DCMAKE_BUILD_TYPE=${{ matrix.config.mode }} \
-DNET_LINT=${{ matrix.config.lint }}
-DNET_LINT=${{ matrix.config.lint }} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON

- name: Show compile_commands.json
run: cat build/compile_commands.json

- name: Build
run: cmake --build build --target http-client net-web_server-sample net-wss_client-sample
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ jobs:
mode: [Debug, Release]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master

- name: CMake
2 changes: 1 addition & 1 deletion .pkg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[libressl]
url=git@github.com:motis-project/libressl.git
branch=master
commit=390253a44ceef00eb620c38606588414326e9f23
commit=39c1bf084d5c179d7bbce7ba902fffbebff0ee15
[zlib]
url=git@github.com:motis-project/zlib.git
branch=master
4 changes: 2 additions & 2 deletions .pkg.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
9210674800565596287
12874606302172861513
zlib 1e1dfdedddb54a2e2cb8fec3b67f925233c495aa
boost be5235eb2258d2ec19e32546ab767a62311d9b46
libressl bee3119f95205181a9634b973d8baeedf62df06d
libressl 39c1bf084d5c179d7bbce7ba902fffbebff0ee15