Skip to content

Commit

Permalink
clear-stack: switch workflow to matrix; + no-warning when json
Browse files Browse the repository at this point in the history
  • Loading branch information
tfaoliveira committed Nov 27, 2023
1 parent cb60230 commit f0f3595
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 130 deletions.
162 changes: 33 additions & 129 deletions .github/workflows/amd64-linux-clear-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,58 +9,32 @@ on:

jobs:

compile-clear-stack-loop:
compile-clear-stack:
runs-on: [self-hosted, linux, X64, amd64-main]
steps:
- name: checkout
uses: actions/checkout@v3

- name: compile
run: JASMIN=$(which_jasminc) make -j$JOBS -C src/ CI=1 JFLAGS="-stack-zeroization loopSCT" default
- name: print logs
run: JASMIN=$(which_jasminc) make -C src/ CI=1 reporter
- name: return error if there are any errors
run: make -C src/ CI=1 err

- name: libjade-logs-src-clear-stack-loop.tar.gz - contains non-empty logs and errors
if: always()
uses: actions/upload-artifact@v3
with:
name: libjade-logs-src-clear-stack-loop.tar.gz
path: src/libjade-logs-src.tar.gz


compile-clear-stack-unrolled:
runs-on: [self-hosted, linux, X64, amd64-main]
strategy:
matrix:
stack_zeroization:
- loop
- loopSCT
- unrolled
stack_zeroization_size:
- u8
- u16
- u32
- u64
- u128
- u256
steps:
- name: checkout
uses: actions/checkout@v3

- name: compile
run: JASMIN=$(which_jasminc) make -j$JOBS -C src/ CI=1 JFLAGS="-stack-zeroization unrolled" default
- name: print logs
run: JASMIN=$(which_jasminc) make -C src/ CI=1 reporter
- name: return error if there are any errors
run: make -C src/ CI=1 err

- name: libjade-logs-src-clear-stack-unrolled.tar.gz - contains non-empty logs and errors
if: always()
uses: actions/upload-artifact@v3
with:
name: libjade-logs-src-clear-stack-unrolled.tar.gz
path: src/libjade-logs-src.tar.gz
run: JASMIN=$(which_jasminc) make -j$JOBS -C src/ CI=1 JFLAGS="-stack-zeroization ${{ matrix.stack_zeroization }} -stack-zeroization-size ${{ matrix.stack_zeroization_size }}" default


compile-clear-stack-loop-register-zeroization-all:
runs-on: [self-hosted, linux, X64, amd64-main]
steps:
- name: checkout
uses: actions/checkout@v3

- name: compile
run: JASMIN=$(which_jasminc) make -j$JOBS -C src/ CI=1 JFLAGS="-stack-zeroization loopSCT -register-zeroization all" default
- name: print logs
run: JASMIN=$(which_jasminc) make -C src/ CI=1 reporter

- name: return error if there are any errors
run: make -C src/ CI=1 err

Expand All @@ -72,112 +46,42 @@ jobs:
path: src/libjade-logs-src.tar.gz


compile-clear-stack-unrolled-register-zeroization-all:
runs-on: [self-hosted, linux, X64, amd64-main]
steps:
- name: checkout
uses: actions/checkout@v3

- name: compile
run: JASMIN=$(which_jasminc) make -j$JOBS -C src/ CI=1 JFLAGS="-stack-zeroization unrolled -register-zeroization all" default
- name: print logs
run: JASMIN=$(which_jasminc) make -C src/ CI=1 reporter
- name: return error if there are any errors
run: make -C src/ CI=1 err

- name: libjade-logs-src-clear-stack-unrolled.tar.gz - contains non-empty logs and errors
if: always()
uses: actions/upload-artifact@v3
with:
name: libjade-logs-src-clear-stack-unrolled.tar.gz
path: src/libjade-logs-src.tar.gz







test-clear-stack-loop:
test-clear-stack:
runs-on: [self-hosted, linux, X64, amd64-main]
steps:
- name: checkout
uses: actions/checkout@v3

- name: compile and run
run: JASMIN=$(which_jasminc) make -j$JOBS -C test/ CI=1 JFLAGS="-stack-zeroization loopSCT" EXCLUDE=crypto_sign/falcon/falcon512/amd64/avx2/ default
- name: print logs
run: JASMIN=$(which_jasminc) make -C test/ CI=1 reporter
- name: return error if there are any errors
run: make -C test/ CI=1 err

- name: libjade-logs-test-clear-stack-loop.tar.gz - contains non-empty logs and errors
if: always()
uses: actions/upload-artifact@v3
with:
name: libjade-logs-test-clear-stack-loop.tar.gz
path: test/libjade-logs-test.tar.gz


test-clear-stack-unrolled:
runs-on: [self-hosted, linux, X64, amd64-main]
strategy:
matrix:
stack-zeroization:
- loop
- loopSCT
- unrolled
stack-zeroization-size:
- u8
- u16
- u32
- u64
- u128
- u256
steps:
- name: checkout
uses: actions/checkout@v3

- name: compile and run
run: JASMIN=$(which_jasminc) make -j$JOBS -C test/ CI=1 JFLAGS="-stack-zeroization unrolled" EXCLUDE=crypto_sign/falcon/falcon512/amd64/avx2/ default
run: JASMIN=$(which_jasminc) make -j$JOBS -C test/ CI=1 JFLAGS="-stack-zeroization ${{ matrix.stack_zeroization }} -stack-zeroization-size ${{ matrix.stack_zeroization_size }}" EXCLUDE=crypto_sign/falcon/falcon512/amd64/avx2/ default
- name: print logs
run: JASMIN=$(which_jasminc) make -C test/ CI=1 reporter
- name: return error if there are any errors
run: make -C test/ CI=1 err

- name: libjade-logs-test-clear-stack-unrolled.tar.gz - contains non-empty logs and errors
if: always()
uses: actions/upload-artifact@v3
with:
name: libjade-logs-test-clear-stack-unrolled.tar.gz
path: test/libjade-logs-test.tar.gz


test-clear-stack-loop-register-zeroization-all:
runs-on: [self-hosted, linux, X64, amd64-main]
steps:
- name: checkout
uses: actions/checkout@v3

- name: compile and run
run: JASMIN=$(which_jasminc) make -j$JOBS -C test/ CI=1 JFLAGS="-stack-zeroization loopSCT -register-zeroization all" EXCLUDE=crypto_sign/falcon/falcon512/amd64/avx2/ default
- name: print logs
run: JASMIN=$(which_jasminc) make -C test/ CI=1 reporter
- name: return error if there are any errors
run: make -C test/ CI=1 err

- name: libjade-logs-test-clear-stack-loop-register-zeroization-all.tar.gz - contains non-empty logs and errors
if: always()
uses: actions/upload-artifact@v3
with:
name: libjade-logs-test-clear-stack-loop-register-zeroization-all.tar.gz
path: test/libjade-logs-test.tar.gz

test-clear-stack-unrolled-register-zeroization-all:
runs-on: [self-hosted, linux, X64, amd64-main]
steps:
- name: checkout
uses: actions/checkout@v3

- name: compile and run
run: JASMIN=$(which_jasminc) make -j$JOBS -C test/ CI=1 JFLAGS="-stack-zeroization unrolled -register-zeroization all" EXCLUDE=crypto_sign/falcon/falcon512/amd64/avx2/ default
- name: print logs
run: JASMIN=$(which_jasminc) make -C test/ CI=1 reporter
- name: return error if there are any errors
run: make -C test/ CI=1 err

- name: libjade-logs-test-clear-stack-unrolled-register-zeroization-all.tar.gz - contains non-empty logs and errors
- name: libjade-logs-test-clear-stack-loop.tar.gz - contains non-empty logs and errors
if: always()
uses: actions/upload-artifact@v3
with:
name: libjade-logs-test-clear-stack-unrolled-register-zeroization-all.tar.gz
name: libjade-logs-test-clear-stack-loop.tar.gz
path: test/libjade-logs-test.tar.gz


2 changes: 1 addition & 1 deletion src/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ $(EC_DIR)/%_ct.ec : %.$(JEXT) $(DEPS_DIR)/%_ct.ec.d | $(DEPS_DIR) $(EC_DIR) $(CI

.PRECIOUS: .%.stack-alloc.json

.%.stack-alloc.json: JFLAGS += -print-stack-alloc-json
.%.stack-alloc.json: JFLAGS += -print-stack-alloc-json -nowarning
.%.stack-alloc.json: %.$(JEXT) $(DEPS_DIR)/%.s.d | $(DEPS_DIR) $(CI_DIR)
$(DEPS)
($(JASMINC) $< 2>$@) $(CIT)
Expand Down

0 comments on commit f0f3595

Please sign in to comment.