Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Hanno Becker <[email protected]>
  • Loading branch information
hanno-becker committed Oct 17, 2024
1 parent f14a822 commit 8a5fd05
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 39 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/bench_ec2_any.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,14 @@ on:
description: Run with optimized code if enabled
type: boolean
default: true
verbose:
description: Determine for the log verbosity
type: boolean
default: false
bench_extra_args:
description: Additional command line to be appended to `tests bench` script
default: ''
cross_prefix:
description: "Binary prefix for cross-compilation builds"
compiler:
description: Compiler to use. When unset, default nix shell is used.
default: ''
additional_packages:
description: Additional packages to install when custom compiler is used.
default: ''
jobs:
bench-ec2-any:
Expand All @@ -55,7 +54,7 @@ jobs:
opt: ${{ inputs.opt }}
name: ${{ inputs.name }}
store_results: false
verbose: ${{ inputs.verbose }}
bench_extra_args: ${{ inputs.bench_extra_args }}
cross_prefix: ${{ inputs.cross_prefix }}
compiler: ${{ inputs.compiler }}
additional_packages: ${{ inputs.additional_packages }}
secrets: inherit
66 changes: 35 additions & 31 deletions .github/workflows/bench_ec2_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,13 @@ on:
type: string
description: Additional command line to be appended to `bench` script
default: ''
cross_prefix:
compiler:
type: string
description: "Binary prefix for cross-compilation builds"
description: Compiler to use. When unset, default nix shell is used.
default: ''
additional_packages:
type: string
description: Additional packages to install when custom compiler is used.
default: ''
env:
AWS_ROLE: arn:aws:iam::559050233797:role/mlkem-c-aarch64-gh-action
Expand Down Expand Up @@ -98,62 +102,62 @@ jobs:
ec2-instance-type: ${{ inputs.ec2_instance_type }}
subnet-id: subnet-07b2729e5e065962f
security-group-id: sg-0ab2e297196c8c381
# bench_nix:
# name: Bench nix ${{ inputs.name }}
# runs-on: ${{ needs.start-ec2-runner.outputs.label }}
# needs: start-ec2-runner # required to start the main job when the runner is ready
# steps:
# - uses: actions/checkout@v4
# - uses: ./.github/actions/bench
# with:
# nix-shell: bench
# nix-cache: false
# nix-verbose: ${{ inputs.verbose }}
# name: ${{ inputs.name }}
# cflags: ${{ inputs.cflags }}
# archflags: ${{ inputs.archflags }}
# opt: ${{ inputs.opt }}
# perf: PERF
# store_results: ${{ inputs.store_results }}
# bench_extra_args: ${{ inputs.bench_extra_args }}
# gh_token: ${{ secrets.AWS_GITHUB_TOKEN }}
# cross_prefix: ${{ inputs.cross_prefix }}
bench_clang:
bench_nix:
name: Bench nix ${{ inputs.name }}
runs-on: ${{ needs.start-ec2-runner.outputs.label }}
needs: start-ec2-runner # required to start the main job when the runner is ready
if: ${{ inputs.compiler == '' }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/bench
with:
nix-shell: bench
nix-cache: false
nix-verbose: ${{ inputs.verbose }}
name: ${{ inputs.name }}
cflags: ${{ inputs.cflags }}
archflags: ${{ inputs.archflags }}
opt: ${{ inputs.opt }}
perf: PERF
store_results: ${{ inputs.store_results }}
bench_extra_args: ${{ inputs.bench_extra_args }}
gh_token: ${{ secrets.AWS_GITHUB_TOKEN }}
bench_custom:
name: Bench nix ${{ inputs.name }}
runs-on: ${{ needs.start-ec2-runner.outputs.label }}
needs: start-ec2-runner # required to start the main job when the runner is ready
if: ${{ inputs.compiler != '' }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-ubuntu
with:
packages: clang-18
- name: Set clang-18 as default
packages: ${{ inputs.additional_packages }}
- name: Set compiler
run: |
echo "CC=clang-18" >> "$GITHUB_ENV"
echo "CC=${{ inputs.compiler }}" >> "$GITHUB_ENV"
- uses: ./.github/actions/bench
with:
nix-shell: ''
custom-shell: 'bash'
nix-cache: false
nix-verbose: ${{ inputs.verbose }}
name: ${{ inputs.name }} (clang-18)
cflags: ${{ inputs.cflags }} -mtune=native -march=native -Wno-unused-command-line-argument
name: ${{ inputs.name }} (${{ inputs.compiler }})
cflags: ${{ inputs.cflags }}
archflags: ${{ inputs.archflags }}
opt: ${{ inputs.opt }}
perf: PERF
store_results: ${{ inputs.store_results }}
bench_extra_args: ${{ inputs.bench_extra_args }}
gh_token: ${{ secrets.AWS_GITHUB_TOKEN }}
cross_prefix: ${{ inputs.cross_prefix }}
stop-ec2-runner:
name: Stop ${{ inputs.name }} (${{ inputs.ec2_instance_type }})
permissions:
contents: 'read'
id-token: 'write'
needs:
- start-ec2-runner
# - bench_nix # required to wait when the main job is done
- bench_clang # required to wait when the main job is done
- bench_nix # required to wait when the main job is done
- bench_custom # required to wait when the main job is done
runs-on: ubuntu-latest
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
steps:
Expand Down

0 comments on commit 8a5fd05

Please sign in to comment.