Skip to content
New issue

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

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

Already on GitHub? # to your account

Drop CircleCI and switch to GitHub Actions #120

Merged
merged 7 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 0 additions & 73 deletions .circleci/config.yml

This file was deleted.

7 changes: 0 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE

This file was deleted.

7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Thank you for contributing to OQS-BoringSSL! Before submitting your pull request, please ensure the following:

1. Your changes include new tests or modifications to existing tests as needed.

2. You have tested the changes in a clean build environment.

3. Your changes do not break the build for projects (i.e., [NGINX-QUIC](https://github.com/open-quantum-safe/oqs-demos/blob/main/nginx/Dockerfile-QUIC), [cURL-QUIC](https://github.com/open-quantum-safe/oqs-demos/blob/main/curl/Dockerfile-QUIC), and [Chromium](https://github.com/open-quantum-safe/oqs-demos/tree/main/chromium)) that depend on OQS-BoringSSL.
49 changes: 49 additions & 0 deletions .github/workflows/shared.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: OQS-BoringSSL (Shared)

on:
push:
branches:
- master
paths-ignore:
- '**.md'
- 'oqs_template/**'
pull_request:
paths-ignore:
- '**.md'
- 'oqs_template/**'
schedule:
baentsch marked this conversation as resolved.
Show resolved Hide resolved
- cron: '2 7 18,28 * *'
workflow_dispatch:

jobs:
build-shared:
name: Build Shared
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Install all dependencies
run: sudo apt update && sudo apt install cmake gcc ninja-build libunwind-dev pkg-config python3 -y
- name: Download and configure liboqs
run: |
git clone --branch main --single-branch --depth 1 https://github.com/open-quantum-safe/liboqs.git
cd liboqs && mkdir build && cd build && cmake -G"Ninja" -DBUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_PREFIX=../../oqs -DOQS_USE_OPENSSL=OFF ..
shell: bash
- name: Build and install liboqs
working-directory: ./liboqs/build
run: ninja && ninja install
shell: bash
- name: Configure OQS-BoringSSL
run: mkdir build && cd build && cmake -GNinja -DBUILD_SHARED_LIBS=1 -DLIBOQS_SHARED=1 ..
shell: bash
- name: Build OQS-BoringSSL
working-directory: ./build
run: ninja
shell: bash
- name: Run tests
working-directory: ./build
run: ninja run_tests && cd .. && python3 oqs_scripts/try_handshake.py
shell: bash
49 changes: 49 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: OQS-BoringSSL (Static)

on:
push:
branches:
- master
paths-ignore:
- '**.md'
- 'oqs_template/**'
pull_request:
paths-ignore:
- '**.md'
- 'oqs_template/**'
schedule:
- cron: '2 7 18,28 * *'
baentsch marked this conversation as resolved.
Show resolved Hide resolved
workflow_dispatch:

jobs:
build-static:
name: Build Static
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Install all dependencies
run: sudo apt update && sudo apt install cmake gcc ninja-build libunwind-dev pkg-config python3 -y
- name: Download and configure liboqs
run: |
git clone --branch main --single-branch --depth 1 https://github.com/open-quantum-safe/liboqs.git
cd liboqs && mkdir build && cd build && cmake -G"Ninja" -DCMAKE_INSTALL_PREFIX=../../oqs -DOQS_USE_OPENSSL=OFF ..
shell: bash
- name: Build and install liboqs
working-directory: ./liboqs/build
run: ninja && ninja install
shell: bash
- name: Configure OQS-BoringSSL
run: mkdir build && cd build && cmake -GNinja ..
shell: bash
- name: Build OQS-BoringSSL
working-directory: ./build
run: ninja
shell: bash
- name: Run tests
working-directory: ./build
run: ninja run_tests && cd .. && python3 oqs_scripts/try_handshake.py
shell: bash
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![CircleCI](https://circleci.com/gh/open-quantum-safe/boringssl/tree/master.svg?style=svg)](https://circleci.com/gh/open-quantum-safe/boringssl/tree/master)
[![OQS-BoringSSL (Static)](https://github.com/open-quantum-safe/boringssl/actions/workflows/static.yml/badge.svg)](https://github.com/open-quantum-safe/boringssl/actions/workflows/static.yml)
[![OQS-BoringSSL (Shared)](https://github.com/open-quantum-safe/boringssl/actions/workflows/shared.yml/badge.svg)](https://github.com/open-quantum-safe/boringssl/actions/workflows/shared.yml)

OQS-BoringSSL
==================================
Expand Down Expand Up @@ -112,7 +113,7 @@ We've only tested the fork on the latest Ubuntu LTS and Windows. This fork has l
On **Ubuntu**, you need to install the following packages:

```
sudo apt install cmake gcc ninja-build libunwind-dev pkg-config python3 python3-psutil golang-go
sudo apt install cmake gcc ninja-build libunwind-dev pkg-config python3 golang-go
```

You will also need the latest version of the toolchain for the Go programming language, available [here](https://golang.org/dl/)
Expand Down
6 changes: 2 additions & 4 deletions oqs_scripts/try_handshake.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# client and server can establish a handshake with the choices.

import argparse
import psutil
import random
import subprocess
import time
Expand Down Expand Up @@ -96,20 +95,19 @@
def try_handshake(bssl):
random_sig = random.choice(sigs)
server = subprocess.Popen([bssl, 'server',
'-accept', '0',
'-accept', '26150',
'-sig-alg', random_sig],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)

# The server should (hopefully?) start
# in 10 seconds.
time.sleep(10)
server_port = psutil.Process(server.pid).connections()[0].laddr.port

# Try to connect to it with the client
random_kex = random.choice(kexs)
client = subprocess.run([bssl, 'client',
'-connect', 'localhost:{}'.format(str(server_port)),
'-connect', 'localhost:26150',
'-curves', random_kex],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
Expand Down
Loading