Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add further Windows and MacOS tests #753

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/actions/setup-brew/action.yml
Original file line number Diff line number Diff line change
@@ -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 }}
8 changes: 8 additions & 0 deletions .github/actions/setup-os/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
24 changes: 18 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
11 changes: 7 additions & 4 deletions Makefile.Microsoft_nmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading