diff --git a/.github/actions/setup-brew/action.yml b/.github/actions/setup-brew/action.yml new file mode 100644 index 000000000..cf9fb60dc --- /dev/null +++ b/.github/actions/setup-brew/action.yml @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: Apache-2.0 + +name: Dependencies (apt) +description: Install dependencies via brew + +inputs: + packages: + description: Space-separated list of additional packages to install + required: false + default: '' + sudo: + required: false + default: 'sudo' + +runs: + using: composite + steps: + - name: Update package repository + shell: bash + run: | + brew update + - name: Install base packages + shell: bash + run: | + brew install make python3 + - name: Install additional packages + if: ${{ inputs.packages != ''}} + shell: bash + run: | + brew install ${{ inputs.packages }} diff --git a/.github/actions/setup-os/action.yml b/.github/actions/setup-os/action.yml index b1b26feaa..20d82c800 100644 --- a/.github/actions/setup-os/action.yml +++ b/.github/actions/setup-os/action.yml @@ -20,6 +20,8 @@ runs: run: | if (which yum > /dev/null); then echo PKG="yum" >> $GITHUB_ENV + elif (which brew > /dev/null); then + echo PKG="brew" >> $GITHUB_ENV elif (which apt > /dev/null); then echo PKG="apt" >> $GITHUB_ENV fi @@ -35,3 +37,9 @@ runs: with: packages: ${{ inputs.packages }} sudo: ${{ inputs.sudo }} + - name: Setup via brew + if: ${{ env.PKG == 'brew' }} + uses: ./.github/actions/setup-brew + with: + packages: ${{ inputs.packages }} + sudo: ${{ inputs.sudo }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09c1e7158..7798032bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,10 @@ jobs: name: 'aarch64' - runner: ubuntu-latest name: 'x86_64' + - runner: macos-latest + name: 'macos (aarch64)' + - runner: macos-13 + name: 'macos (x86_64)' exclude: - {external: true, target: { @@ -61,7 +65,7 @@ jobs: OPT=0 make quickcheck make clean >/dev/null OPT=1 make quickcheck - - uses: ./.github/actions/setup-apt + - uses: ./.github/actions/setup-os - name: tests func run: | ./scripts/tests func @@ -114,8 +118,12 @@ jobs: run: | ./scripts/check-namespace quickcheck-windows: - name: Quickcheck windows-latest - runs-on: windows-latest + strategy: + fail-fast: false + matrix: + system: [windows-latest, windows-2022, windows-2019] + name: Quickcheck ${{ matrix.system }} + runs-on: ${{ matrix.system }} steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 @@ -129,7 +137,7 @@ jobs: name: Quickcheck lib strategy: matrix: - system: [macos-latest, ubuntu-latest, pqcp-arm64] + system: [macos-latest, macos-13, ubuntu-latest, pqcp-arm64] runs-on: ${{ matrix.system }} steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -140,7 +148,7 @@ jobs: name: Examples strategy: matrix: - system: [macos-latest, ubuntu-latest, pqcp-arm64] + system: [macos-latest, macos-13, ubuntu-latest, pqcp-arm64] runs-on: ${{ matrix.system }} steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -218,7 +226,11 @@ jobs: - ${{ github.repository_owner != 'pq-code-package' }} target: - runner: macos-latest - name: 'MacOS' + name: 'MacOS (aarch64)' + arch: mac + mode: native + - runner: macos-13 + name: 'MacOS (x86_64)' arch: mac mode: native - runner: pqcp-arm64 diff --git a/Makefile.Microsoft_nmake b/Makefile.Microsoft_nmake index 94de4beed..39f534f4c 100644 --- a/Makefile.Microsoft_nmake +++ b/Makefile.Microsoft_nmake @@ -3,16 +3,19 @@ CFLAGS = /nologo /O2 /Imlkem /Imlkem/fips202 /Imlkem/fips202/native /Imlkem/sys /Imlkem/native OBJ_FILES = .\mlkem\*.obj \ - .\mlkem\fips202\*.obj \ + .\mlkem\fips202\*.obj BUILD_DIR = test\build MLKEM512_BUILD_DIR = $(BUILD_DIR)\mlkem512 MLKEM768_BUILD_DIR = $(BUILD_DIR)\mlkem768 MLKEM1024_BUILD_DIR = $(BUILD_DIR)\mlkem1024 -OBJ_FILES_512 = $(subst .\,$(MLKEM512_BUILD_DIR)\,$(OBJ_FILES)) -OBJ_FILES_768 = $(subst .\,$(MLKEM768_BUILD_DIR)\,$(OBJ_FILES)) -OBJ_FILES_1024 = $(subst .\,$(MLKEM1024_BUILD_DIR)\,$(OBJ_FILES)) +OBJ_FILES_512 = $(MLKEM512_BUILD_DIR)\mlkem\*.obj \ + $(MLKEM512_BUILD_DIR)\mlkem\fips202\*.obj +OBJ_FILES_768 = $(MLKEM768_BUILD_DIR)\mlkem\*.obj \ + $(MLKEM768_BUILD_DIR)\mlkem\fips202\*.obj +OBJ_FILES_1024 = $(MLKEM1024_BUILD_DIR)\mlkem\*.obj \ + $(MLKEM1024_BUILD_DIR)\mlkem\fips202\*.obj # NOTE: We currently only build code for non-opt code, as we haven't yet made the assembly compatible on Windows !IFNDEF OPT