-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from cryspen/franziskus/dev-cleanup
initial version
- Loading branch information
1 parent
f5b1f74
commit f048825
Showing
988 changed files
with
361,431 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
#!/bin/sh | ||
|
||
set -eu | ||
|
||
help() { | ||
echo "Usage: $0 [--release <ubuntu-release>] [--rc]" > /dev/stderr | ||
} | ||
|
||
doing= | ||
rc= | ||
release= | ||
help= | ||
for opt in "$@" | ||
do | ||
case "${doing}" in | ||
release) | ||
release="${opt}" | ||
doing= | ||
;; | ||
"") | ||
case "${opt}" in | ||
--rc) | ||
rc=1 | ||
;; | ||
--release) | ||
doing=release | ||
;; | ||
--help) | ||
help=1 | ||
;; | ||
esac | ||
;; | ||
esac | ||
done | ||
|
||
if [ -n "${doing}" ] | ||
then | ||
echo "--${doing} option given no argument." > /dev/stderr | ||
echo > /dev/stderr | ||
help | ||
exit 1 | ||
fi | ||
|
||
if [ -n "${help}" ] | ||
then | ||
help | ||
exit | ||
fi | ||
|
||
if [ -z "${release}" ] | ||
then | ||
unset UBUNTU_CODENAME | ||
. /etc/os-release | ||
|
||
if [ -z "${UBUNTU_CODENAME+x}" ] | ||
then | ||
echo "This is not an Ubuntu system. Aborting." > /dev/stderr | ||
exit 1 | ||
fi | ||
|
||
release="${UBUNTU_CODENAME}" | ||
fi | ||
|
||
case "${release}" in | ||
xenial) | ||
packages="apt-transport-https" | ||
keyring_packages="wget" | ||
;; | ||
bionic|focal) | ||
packages= | ||
keyring_packages="gpg wget" | ||
;; | ||
*) | ||
echo "Only Ubuntu Xenial (16.04), Bionic (18.04), and Focal (20.04) are supported. Aborting." > /dev/stderr | ||
exit 1 | ||
;; | ||
esac | ||
|
||
get_keyring= | ||
if [ ! -f /usr/share/keyrings/kitware-archive-keyring.gpg ] | ||
then | ||
packages="${packages} ${keyring_packages}" | ||
get_keyring=1 | ||
fi | ||
|
||
# Start the real work | ||
set -x | ||
|
||
apt-get update | ||
# shellcheck disable=SC2086 | ||
apt-get install -y ${packages} | ||
|
||
test -n "${get_keyring}" && (wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - > /usr/share/keyrings/kitware-archive-keyring.gpg) | ||
|
||
echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ ${release} main" > /etc/apt/sources.list.d/kitware.list | ||
if [ -n "${rc}" ] | ||
then | ||
echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ ${release}-rc main" >> /etc/apt/sources.list.d/kitware.list | ||
fi | ||
|
||
apt-get update | ||
test -n "${get_keyring}" && rm /usr/share/keyrings/kitware-archive-keyring.gpg | ||
apt-get install -y kitware-archive-keyring |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"contributors": ["franziskuskiefer","karthikbhargavan"], | ||
"message": "We require contributors to sign our Contributor License Agreement https://github.com/cryspen/hacl/blob/main/CLA.md ensuring that the contribution can be licensed under Apache 2.0. In order for us to review and merge your code, please mention @cryspen/core in a comment below to get yourself added." | ||
"message": "We require contributors to sign our Contributor License Agreement https://github.com/cryspen/hacl/blob/main/CLA.md ensuring that the contribution can be licensed under Apache 2.0 and MIT. In order for us to review and merge your code, please mention @cryspen/core in a comment below to get yourself added." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
BasedOnStyle: Mozilla |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
kind: pipeline | ||
type: docker | ||
name: arm64 | ||
|
||
platform: | ||
arch: arm64 | ||
|
||
steps: | ||
- name: test | ||
image: ubuntu:20.04 | ||
commands: | ||
- ./.ci/kitware-archive.sh | ||
- apt-get update -qq --yes && apt-get install -qq --yes clang cmake ninja-build python3 | ||
- ./mach build --test -v -c | ||
- ./mach build --release --test -v -c | ||
|
||
# --- | ||
# Doesn't work right now "At least one invalid signature was encountered" | ||
# | ||
# kind: pipeline | ||
# type: docker | ||
# name: arm32 | ||
# | ||
# platform: | ||
# arch: arm | ||
# | ||
# steps: | ||
# - name: test | ||
# image: ubuntu:20.04 | ||
# commands: | ||
# | ||
# - ./.ci/kitware-archive.sh | ||
# - apt-get update -qq --yes && apt-get install -qq --yes clang cmake ninja-build python3 | ||
# - ./mach build --test -v -c | ||
# - ./mach build --release --test -v -c | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,246 @@ | ||
name: c | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
macos: | ||
runs-on: macos-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
compiler: [{ cpp: g++-11, c: gcc-11 }, { cpp: clang++, c: clang }] | ||
env: | ||
CC: ${{ matrix.compiler.c }} | ||
CXX: ${{ matrix.compiler.cpp }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Output name | ||
id: vars | ||
run: | | ||
echo ::set-output name=short_sha::${GITHUB_SHA: -8} | ||
- name: Setup | ||
run: brew install ninja | ||
- name: Debug Build & Test | ||
run: ./mach build --test -v | ||
- name: Release Build & Test | ||
run: ./mach build --release --test -v | ||
- name: Install | ||
run: | | ||
mkdir pkg-release | ||
./mach install -p $PWD/pkg-release -c Release | ||
mkdir pkg-debug | ||
./mach install -p $PWD/pkg-debug | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: macos-x64-${{ matrix.compiler.c }}-${{ steps.vars.outputs.short_sha }} | ||
path: | | ||
pkg-debug | ||
pkg-release | ||
build/Debug | ||
build/Release | ||
macos-aarch64: | ||
runs-on: macos-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: ["aarch64-apple-ios", "aarch64-apple-darwin"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Output name | ||
id: vars | ||
run: | | ||
echo ::set-output name=short_sha::${GITHUB_SHA: -8} | ||
- name: Setup | ||
run: brew install ninja | ||
- name: Debug Build | ||
run: ./mach build --tests -v --target ${{ matrix.target }} | ||
- name: Release Build | ||
run: ./mach build --release --tests -v --target ${{ matrix.target }} | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ matrix.target }}-${{ steps.vars.outputs.short_sha }} | ||
path: | | ||
build/Debug | ||
build/Release | ||
linux-gcc: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
compiler: [7, 8, 9, 10, 11] | ||
env: | ||
CC: gcc-${{ matrix.compiler }} | ||
CXX: g++-${{ matrix.compiler }} | ||
steps: | ||
- name: Output name | ||
id: vars | ||
run: | | ||
echo ::set-output name=short_sha::${GITHUB_SHA: -8} | ||
- name: Setup | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install ninja-build gcc-${{ matrix.compiler }} g++-${{ matrix.compiler }} | ||
- uses: actions/checkout@v2 | ||
- name: Debug Build & Test | ||
run: ./mach build --test -v | ||
- name: Release Build & Test | ||
run: ./mach build --release --test -v | ||
- name: Install | ||
run: | | ||
mkdir pkg-release | ||
./mach install -p $PWD/pkg-release -c Release | ||
mkdir pkg-debug | ||
./mach install -p $PWD/pkg-debug | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: linux-x64-gcc${{ matrix.compiler }}-${{ steps.vars.outputs.short_sha }} | ||
path: | | ||
pkg-debug | ||
pkg-release | ||
build/Debug | ||
build/Release | ||
linux-clang: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
compiler: [7, 8, 9, 10] | ||
options: ["", "-m32"] | ||
env: | ||
CC: clang-${{ matrix.compiler }} | ||
CXX: clang++-${{ matrix.compiler }} | ||
steps: | ||
- name: Output name | ||
id: vars | ||
run: | | ||
echo ::set-output name=short_sha::${GITHUB_SHA: -8} | ||
- name: Setup | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install ninja-build clang-${{ matrix.compiler }} gcc-multilib g++-multilib | ||
- uses: actions/checkout@v2 | ||
- name: Debug Build & Test | ||
run: ./mach build --test -v ${{ matrix.options }} | ||
- name: Release Build & Test | ||
run: ./mach build --release --test -v ${{ matrix.options }} | ||
- name: Install | ||
run: | | ||
mkdir pkg-release | ||
./mach install -p $PWD/pkg-release -c Release | ||
mkdir pkg-debug | ||
./mach install -p $PWD/pkg-debug | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: linux-x64-clang${{ matrix.compiler }}-${{ steps.vars.outputs.short_sha }}${{ matrix.options }} | ||
path: | | ||
pkg-debug | ||
pkg-release | ||
build/Debug | ||
build/Release | ||
android: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: ["aarch64-linux-android"] | ||
steps: | ||
- name: Output name | ||
id: vars | ||
run: | | ||
echo ::set-output name=short_sha::${GITHUB_SHA: -8} | ||
- name: Setup | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install ninja-build | ||
- uses: actions/checkout@v2 | ||
- name: Debug Build | ||
run: ./mach build --tests -v --target ${{ matrix.target }} --ndk $ANDROID_NDK_HOME | ||
- name: Release Build | ||
run: ./mach build --release --tests -v --target ${{ matrix.target }} --ndk $ANDROID_NDK_HOME | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ matrix.target }}-${{ steps.vars.outputs.short_sha }} | ||
path: | | ||
build/Debug | ||
build/Release | ||
s390x-gcc: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Output name | ||
id: vars | ||
run: | | ||
echo ::set-output name=short_sha::${GITHUB_SHA: -8} | ||
- name: Setup | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install ninja-build g++-10-s390x-linux-gnu gcc-10-s390x-linux-gnu | ||
- uses: actions/checkout@v2 | ||
- name: Debug Build | ||
run: ./mach build --tests --target s390x -v | ||
- name: Release Build | ||
run: ./mach build --release --target s390x --tests -v | ||
- name: Install | ||
run: | | ||
mkdir pkg-release | ||
./mach install -p $PWD/pkg-release -c Release | ||
mkdir pkg-debug | ||
./mach install -p $PWD/pkg-debug | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: linux-s390x-gcc10-${{ steps.vars.outputs.short_sha }} | ||
path: | | ||
pkg-debug | ||
pkg-release | ||
build/Debug | ||
build/Release | ||
windows: | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
compiler: ["", "--msvc"] | ||
# options: ["", "-m32"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
- name: Output name | ||
id: vars | ||
shell: bash | ||
run: | | ||
echo ::set-output name=short_sha::${GITHUB_SHA: -8} | ||
- name: Setup | ||
run: choco install ninja | ||
- name: Debug Build & Test | ||
run: python mach build --test -v ${{ matrix.compiler }} | ||
- name: Release Build & Test | ||
run: python mach build --release --test -v ${{ matrix.compiler }} | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: windows-x64${{ matrix.compiler }}-${{ steps.vars.outputs.short_sha }} | ||
path: | | ||
build/Debug | ||
build/Release | ||
default: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Output name | ||
id: vars | ||
run: | | ||
echo ::set-output name=short_sha::${GITHUB_SHA: -8} | ||
- name: Setup | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install ninja-build | ||
- uses: actions/checkout@v2 | ||
- name: Build | ||
run: ./_build.sh | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: linux-default-${{ steps.vars.outputs.short_sha }} | ||
path: build/Release |
Oops, something went wrong.