Skip to content

Commit

Permalink
use boolean instead of string 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 088765e commit 1b2c5bd
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/actions/bench/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ inputs:
default: ''
store_results:
description: Whether to push results to GH pages
default: 'false'
default: false
gh_token:
description: GitHub access token
required: true
Expand Down Expand Up @@ -67,7 +67,7 @@ runs:
run: |
tests bench -c ${{ inputs.perf }} --cflags "${{ inputs.cflags }}" --arch-flags "${{ inputs.archflags }}" -v --output output.json ${{ inputs.bench_extra_args }}
- name: Store benchmark result
if: ${{ inputs.store_results == 'true' }}
if: ${{ inputs.store_results == true }}
uses: benchmark-action/github-action-benchmark@v1
with:
name: ${{ inputs.name }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bench_ec2_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
ec2_ami_id: ami-096ea6a12ea24a797
archflags: -mcpu=cortex-a76 -march=armv8.2-a
cflags: -DFORCE_AARCH64
store_results: 'true'
store_results: true
name: Graviton2
secrets: inherit
bench-gv3:
Expand All @@ -36,6 +36,6 @@ jobs:
ec2_ami_id: ami-096ea6a12ea24a797
archflags: -mcpu=neoverse-v1 -march=armv8.4-a
cflags: -DFORCE_AARCH64
store_results: 'true'
store_results: true
name: Graviton3
secrets: inherit
2 changes: 2 additions & 0 deletions .github/workflows/bench_ec2_any.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ on:
default: -mcpu=cortex-a76 -march=armv8.2-a
store_results:
description: Indicates if results should be pushed to github pages
type: boolean
default: false
always_terminate:
description: Indicates if EC2 instance should always be terminated
type: boolean
default: true
bench_extra_args:
description: Additional command line to be appended to `tests bench` script
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/bench_ec2_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ on:
description: Custom ARCH flags for compilation
default: -mcpu=neoverse-n1 -march=armv8.2-a
store_results:
type: string
type: boolean
description: Indicates if results should be pushed to github pages
default: 'false'
default: false
always_terminate:
type: string
type: boolean
description: Indicates if instance should always be terminated, even on failure
default: 'true'
default: true
bench_extra_args:
type: string
description: Additional command line to be appended to `bench` script
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
- start-ec2-runner
- bench # required to wait when the main job is done
runs-on: ubuntu-latest
if: ${{ (inputs.always_terminate == 'true' && always()) || success() }} # required to stop the runner even if the error happened in the previous jobs
if: ${{ (inputs.always_terminate == true && always()) || success() }} # required to stop the runner even if the error happened in the previous jobs
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/ci_ec2_any.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,20 @@ on:
default: ' '
always_terminate:
description: Indicates if instance should always be terminated, even on failure
default: 'true'
type: boolean
default: true
functest:
description: Whether to run functional tests
default: 'true'
type: boolean
default: true
lint:
description: Whether to lint
default: 'true'
type: boolean
default: true
cbmc:
description: Whether to run CBMC proofs
default: 'false'
type: boolean
default: false
jobs:
ci-ec2-any:
name: Ad-hoc CI on $${{ inputs.ec2_instance_type }}
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/ci_ec2_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ on:
description: Cross-compilation binary prefix, if any
default: ' '
always_terminate:
type: string
type: boolean
description: Indicates if instance should always be terminated, even on failure
default: 'true'
default: true
functest:
type: string
default: 'true'
type: boolean
default: true
lint:
type: string
default: 'true'
type: boolean
default: true
cbmc:
type: string
default: 'false'
type: boolean
default: false
env:
AWS_ROLE: arn:aws:iam::559050233797:role/mlkem-c-aarch64-gh-action
AWS_REGION: us-east-1
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
name: Functional tests ${{ inputs.name }}
needs: start-ec2-runner
runs-on: ${{ needs.start-ec2-runner.outputs.label }}
if: ${{ inputs.functest == 'true' }}
if: ${{ inputs.functest == true }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/functest
Expand All @@ -89,7 +89,7 @@ jobs:
name: Linting ${{ inputs.name }}
needs: start-ec2-runner
runs-on: ${{ needs.start-ec2-runner.outputs.label }}
if: ${{ inputs.lint == 'true' }}
if: ${{ inputs.lint == true }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/lint
Expand All @@ -100,7 +100,7 @@ jobs:
name: CBMC ${{ inputs.name }}
needs: start-ec2-runner
runs-on: ${{ needs.start-ec2-runner.outputs.label }}
if: ${{ inputs.cbmc == 'true' }}
if: ${{ inputs.cbmc == true }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/cbmc
Expand Down

0 comments on commit 1b2c5bd

Please sign in to comment.