Skip to content

Commit

Permalink
Drop CircleCI and switch to GitHub Actions (#120)
Browse files Browse the repository at this point in the history
Signed-off-by: PI <[email protected]>
  • Loading branch information
pi-314159 authored Aug 23, 2024
1 parent 65b3178 commit 4aa5d07
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 86 deletions.
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:
- 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 * *'
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

0 comments on commit 4aa5d07

Please sign in to comment.