Skip to content

Commit

Permalink
run opt/non-opt in ci
Browse files Browse the repository at this point in the history
Signed-off-by: Thing-han, Lim <[email protected]>
  • Loading branch information
potsrevennil committed Sep 12, 2024
1 parent 136d3a9 commit abdc016
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
9 changes: 6 additions & 3 deletions .github/actions/functest/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ inputs:
cross-prefix:
description: Binary prefix for cross compilation
default: ""
opt:
description: opt flag to pass to test script
default: "true"
runs:
using: composite
steps:
Expand All @@ -39,7 +42,7 @@ runs:
shell: ${{ env.SHELL }}
run: |
echo "::group::func_test"
tests func --cross-prefix=${{ inputs.cross-prefix }} --cflags ${{ inputs.cflags }} -v
tests func --cross-prefix=${{ inputs.cross-prefix }} --cflags ${{ inputs.cflags }} --opt ${{inputs.opt}} -v
echo "::endgroup::"
- name: Run KAT tests
if: |
Expand All @@ -49,7 +52,7 @@ runs:
shell: ${{ env.SHELL }}
run: |
echo "::group::kat_test"
tests kat --cross-prefix=${{ inputs.cross-prefix }} --cflags ${{ inputs.cflags }} -v
tests kat --cross-prefix=${{ inputs.cross-prefix }} --cflags ${{ inputs.cflags }} --opt ${{inputs.opt}} -v
echo "::endgroup::"
- name: Run Nistkat tests
id: nistkat_test
Expand All @@ -60,5 +63,5 @@ runs:
shell: ${{ env.SHELL }}
run: |
echo "::group::nistkat_test"
tests nistkat --cross-prefix=${{ inputs.cross-prefix }} --cflags ${{ inputs.cflags }} -v
tests nistkat --cross-prefix=${{ inputs.cross-prefix }} --cflags ${{ inputs.cflags }} --opt ${{inputs.opt}} -v
echo "::endgroup::"
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ jobs:
use-nix: true
cflags: ${{ matrix.target.cflags }}
cross-prefix: ${{ matrix.target.cross-prefix }}
opt: true
- uses: ./.github/actions/functest
with:
use-nix: true
cflags: ${{ matrix.target.cflags }}
cross-prefix: ${{ matrix.target.cross-prefix }}
opt: false
lint:
strategy:
matrix:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci_ec2_any.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ on:
cflags:
description: Custom CFLAGS for compilation
default:
opt:
description: Run with optimized code if enabled
type: boolean
default: true
cross-prefix:
description: Cross-compilation binary prefix, if any
default: ' '
Expand Down Expand Up @@ -53,6 +57,7 @@ jobs:
ec2_ami_id: ${{ inputs.ec2_ami_id }}
cflags: ${{ inputs.cflags }}
cross-prefix: ${{ inputs.cross-prefix }}
opt: ${{ inputs.opt }}
functest: ${{ inputs.functest }}
lint: ${{ inputs.lint }}
cbmc: ${{ inputs.cbmc }}
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/ci_ec2_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ on:
type: string
description: Cross-compilation binary prefix, if any
default: ' '
opt:
type: boolean
description: Runs with optimized code if enabled.
default: true
always_terminate:
type: boolean
description: Indicates if instance should always be terminated, even on failure
Expand Down Expand Up @@ -99,8 +103,9 @@ jobs:
- uses: ./.github/actions/functest
with:
use-nix: true
cflags: ${{ matrix.target.cflags }}
cross-prefix: ${{ matrix.target.cross-prefix }}
cflags: ${{ inputs.cflags }}
cross-prefix: ${{ inputs.cross-prefix }}
opt: ${{ inputs.opt }}
lint:
name: Linting ${{ inputs.name }}
needs: start-ec2-runner
Expand Down

0 comments on commit abdc016

Please sign in to comment.