From 61594cf53a337c7986371aed465430d39ef07c22 Mon Sep 17 00:00:00 2001 From: "Matthias J. Kannwischer" Date: Mon, 29 Jul 2024 11:39:46 +0800 Subject: [PATCH] adjust CI --- .github/workflows/tests.yaml | 20 +++++--------------- Makefile | 12 +++++------- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index bb54c10..08d1580 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -4,6 +4,9 @@ on: branches: [ "main" ] jobs: test: + strategy: + matrix: + target: [cross-v8a, cross-v84a] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -11,19 +14,6 @@ jobs: submodules: true - name: install dependencies run: sudo apt install gcc-aarch64-linux-gnu qemu-user - - name: Run Dilithium NTT Tests + - name: Run tests run: | - make run-cross-ntt_dilithium - - name: Run Kyber NTT Tests - run: | - make run-cross-ntt_kyber - - name: Run Kyber NTT Tests - run: | - make run-cross-ntt_kyber - - name: Run X25519 Tests - run: | - make run-cross-x25519 - - name: Run Keccak Tests - run: | - make clean - make run-cross-keccak_neon \ No newline at end of file + make runall-${{ matrix.target }} \ No newline at end of file diff --git a/Makefile b/Makefile index 0e166d5..0d98368 100644 --- a/Makefile +++ b/Makefile @@ -18,10 +18,11 @@ elfname = $(addsuffix -test.elf,$(subst /,-,$1)) platformtests := $(foreach test,$(TESTS), $(call testplatforms,$(test))) +platforms = $(sort $(foreach test,$(platformtests),$(firstword $(subst _, ,$(test))))) builds := $(addprefix build-, $(platformtests)) runs := $(addprefix run-, $(platformtests)) -checks := $(addprefix check-, $(platformtests)) +runsplatform := $(addprefix runall-, $(platforms)) cleans := $(addprefix clean-, $(platformtests)) @@ -42,12 +43,9 @@ ${runs}: run-%: .PHONY: run run: ${runs} -.PHONY: ${checks} -${checks}: check-%: - make -C envs/$(platform) check CFLAGS_EXTRA='$(call testcflags,$(test))' SOURCES='$(call testsources,$(test),../../)' ASMS='$(call testasms,$(test),../../)' TARGET=$(call elfname,$(test)) TESTDIR=$(call testdir,$(test),../../) - -.PHONY: check -check: ${checks} +.PHONY:${runsplatform} +${runsplatform}: + make $(filter run-$(subst runall-,,$@)_%, $(runs)) .PHONY: ${cleans} ${cleans}: clean-%: