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-%: