Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
hanno-becker committed Dec 21, 2024
1 parent c4b73fb commit 34bd86f
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 45 deletions.
38 changes: 38 additions & 0 deletions .github/actions/setup-apt/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# SPDX-License-Identifier: Apache-2.0

name: Dependencies (apt)
description: Install dependencies via apt

inputs:
packages:
description: Space-separated list of additional packages to install
required: false
default: ''
sudo:
required: false
default: 'sudo'

runs:
using: composite
steps:
- name: Update package repository
shell: bash
run: |
${{ inputs.sudo }} apt-get update
- name: Install base packages
shell: bash
run: |
${{ inputs.sudo }} apt-get install python3-venv python3-pip make -y
- name: Install additional packages
if: ${{ inputs.packages != ''}}
shell: bash
run: |
${{ inputs.sudo }} apt-get install ${{ inputs.packages }} -y
- name: Setup Python venv
shell: bash
run: |
python3 -m venv venv
source venv/bin/activate
python3 -m pip install -r requirements.txt
deactivate
echo "$(pwd)/venv/bin/" >> "$GITHUB_PATH"
File renamed without changes.
4 changes: 2 additions & 2 deletions .github/actions/setup-os/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ runs:
fi
- name: Setup via yum
if: ${{ env.PKG == 'yum' }}
uses: ./.github/actions/setup-ubuntu
uses: ./.github/actions/setup-yum
with:
packages: ${{ inputs.packages }}
sudo: ${{ inputs.sudo }}
- name: Setup via apt
if: ${{ env.PKG == 'apt' }}
uses: ./.github/actions/setup-ubuntu
uses: ./.github/actions/setup-apt
with:
packages: ${{ inputs.packages }}
sudo: ${{ inputs.sudo }}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0

name: Setup Amazon Linux
description: Setup Amazon Linux
name: Dependencies (yum)
description: Install dependencies via yum

inputs:
packages:
Expand All @@ -16,10 +16,9 @@ runs:
using: composite
steps:
- name: Install base packages
- name: Update package repository
shell: bash
run: |
${{ inputs.sudo }} yum install make git python3-venv -y
${{ inputs.sudo }} yum install make git python3-pip -y
${{ inputs.sudo }} pip3 install virtualenv
- name: Install additional packages
if: ${{ inputs.packages != ''}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bench_ec2_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:
if: ${{ inputs.compiler != '' }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/setup-ubuntu
- uses: ./.github/actions/setup-apt
with:
packages: ${{ inputs.additional_packages }}
- name: Set compiler
Expand Down
77 changes: 63 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
OPT=0 make quickcheck >/dev/null
make clean >/dev/null
OPT=1 make quickcheck >/dev/null
- uses: ./.github/actions/setup-ubuntu
- uses: ./.github/actions/setup-apt
- name: tests func
run: |
./scripts/tests func
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
OPT=0 CPPFLAGS=-std=c90 make quickcheck >/dev/null
make clean >/dev/null
OPT=1 CPPFLAGS=-std=c90 make quickcheck >/dev/null
- uses: ./.github/actions/setup-ubuntu
- uses: ./.github/actions/setup-apt
- name: tests func
run: |
CPPFLAGS="-std=c90" ./scripts/tests func
Expand Down Expand Up @@ -434,30 +434,79 @@ jobs:
# lint: false
# verbose: true
# secrets: inherit
compatibility_tests:
strategy:
max-parallel: 4
fail-fast: false
matrix:
container:
- id: fedora:38
- id: fedora:39
- id: fedora:40
name: Compatibility tests (${{ matrix.container.id }})
runs-on: ubuntu-latest
container:
${{ inputs.container }}
steps:
- name: Manual checkout
shell: bash
run: |
if which yum; then
yum install git -y
elif which apt; then
apt update
apt install git -y
fi
git init
git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY
git fetch origin --depth 1 $GITHUB_SHA
git checkout FETCH_HEAD
- uses: ./.github/actions/setup-os
with:
sudo: ""
- name: make quickcheck
run: |
OPT=0 make quickcheck >/dev/null
make clean >/dev/null
OPT=1 make quickcheck >/dev/null
- name: Functional Tests
uses: ./.github/actions/multi-functest
with:
nix-shell: ""
gh_token: ${{ secrets.AWS_GITHUB_TOKEN }}
cflags: ${{ inputs.cflags }}
compile_mode: ${{ inputs.compile_mode }}
opt: ${{ inputs.opt }}
func: ${{ inputs.functest }}
kat: ${{ inputs.kattest }}
nistkat: ${{ inputs.nistkattest }}
acvp: ${{ inputs.acvptest }}
ec2_compatibilitytests:
strategy:
max-parallel: 8
fail-fast: false
matrix:
container:
# - id: ubuntu-22.04-aarch:gcc-12x
# - id: ubuntu-22.04-aarch:gcc-11x
# - id: ubuntu-20.04-aarch:gcc-8x
# - id: ubuntu-20.04-aarch:gcc-7x
# - id: ubuntu-20.04-aarch:clang-9x
# - id: ubuntu-20.04-aarch:clang-8x
# - id: ubuntu-20.04-aarch:clang-7x-bm-framework
# - id: ubuntu-20.04-aarch:clang-7x
# - id: ubuntu-20.04-aarch:clang-10x
# - id: ubuntu-22.04-aarch:base
- id: ubuntu-20.04-aarch:base
- id: amazonlinux-2-aarch:base
- id: amazonlinux-2-aarch:gcc-7x
- id: amazonlinux-2-aarch:clang-7x
- id: amazonlinux-2023-aarch:base
- id: amazonlinux-2023-aarch:gcc-11x
- id: amazonlinux-2023-aarch:clang-15x
- id: amazonlinux-2023-aarch:clang-15x-sanitizer
- id: amazonlinux-2023-aarch:cryptofuzz
# - id: amazonlinux-2023-aarch:cryptofuzz Not yet supported
- id: ubuntu-22.04-aarch:gcc-12x
- id: ubuntu-22.04-aarch:gcc-11x
- id: ubuntu-20.04-aarch:gcc-8x
- id: ubuntu-20.04-aarch:gcc-7x
- id: ubuntu-20.04-aarch:clang-9x
- id: ubuntu-20.04-aarch:clang-8x
- id: ubuntu-20.04-aarch:clang-7x-bm-framework
- id: ubuntu-20.04-aarch:clang-7x
- id: ubuntu-20.04-aarch:clang-10x
- id: ubuntu-22.04-aarch:base
- id: ubuntu-20.04-aarch:base
name: Compatibility tests (${{ matrix.container.id }})
# needs: [ec2_functests]
permissions:
Expand Down
28 changes: 4 additions & 24 deletions .github/workflows/ci_ec2_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
container:
localhost:5000/${{ inputs.container }}
steps:
- name: Setup system
- name: Manual checkout
shell: bash
run: |
if which yum; then
Expand All @@ -137,28 +137,9 @@ jobs:
git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY
git fetch origin --depth 1 $GITHUB_SHA
git checkout FETCH_HEAD
if which yum; then
yum install make git python3-pip -y
pip3 install virtualenv
virtualenv venv
source venv/bin/activate
python3 -m pip install -r requirements.txt
elif which apt; then
apt update
apt install make python3-pip python3-venv -y
python3 -m venv venv
source venv/bin/activate
python3 -m pip install -r requirements.txt
fi
python3 --version
echo "$(pwd)/venv/bin/" >> "$GITHUB_PATH"
# - uses: ./.github/actions/setup-os
# with:
# sudo: ""
- uses: ./.github/actions/setup-os
with:
sudo: ""
- name: make quickcheck
run: |
OPT=0 make quickcheck >/dev/null
Expand All @@ -176,7 +157,6 @@ jobs:
kat: ${{ inputs.kattest }}
nistkat: ${{ inputs.nistkattest }}
acvp: ${{ inputs.acvptest }}

tests:
name: Run tests
needs: start-ec2-runner
Expand Down

0 comments on commit 34bd86f

Please sign in to comment.