Skip to content

Commit

Permalink
switch everything to mac
Browse files Browse the repository at this point in the history
  • Loading branch information
mkannwischer committed Dec 14, 2024
1 parent 18394da commit 65c0ac7
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 50 deletions.
22 changes: 22 additions & 0 deletions .github/actions/setup-macos/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Setup ubuntu
description: Setup ubuntu


runs:
using: composite
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: "18.1"
- name: Setup Python venv
shell: bash
run: |
python3 -m venv venv
source venv/bin/activate
python3 -m pip install -r requirements.txt
deactivate
echo "$(pwd)/venv/bin/" >> "$GITHUB_PATH"
33 changes: 0 additions & 33 deletions .github/actions/setup-ubuntu/action.yml

This file was deleted.

67 changes: 50 additions & 17 deletions .github/workflows/test_basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@ jobs:
github.event.pull_request.user.login == 'dop-amin' ||
github.event.pull_request.user.login == 'mkannwischer'
}}
runs-on: ubuntu-latest
runs-on: macos-latest
strategy:
matrix:
target: [slothy.targets.arm_v7m.cortex_m4, slothy.targets.arm_v7m.cortex_m7,slothy.targets.arm_v81m.cortex_m55r1, slothy.targets.arm_v81m.cortex_m85r1, slothy.targets.aarch64.cortex_a55, slothy.targets.aarch64.cortex_a72_frontend, slothy.targets.aarch64.apple_m1_firestorm_experimental, slothy.targets.aarch64.apple_m1_icestorm_experimental]
target: [slothy.targets.arm_v7m.cortex_m4,slothy.targets.arm_v7m.cortex_m7,slothy.targets.arm_v81m.cortex_m55r1, slothy.targets.arm_v81m.cortex_m85r1, slothy.targets.aarch64.cortex_a55, slothy.targets.aarch64.cortex_a72_frontend, slothy.targets.aarch64.apple_m1_firestorm_experimental, slothy.targets.aarch64.apple_m1_icestorm_experimental]
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-ubuntu
- name: Install llvm
run: sudo apt-get install -y llvm
- uses: ./.github/actions/setup-macos
- name: Install python dependencies
run: |
python3 -m venv venv
./venv/bin/python3 -m pip install -r requirements.txt
echo BASH_ENV="./venv/bin/activate" >> $GITHUB_ENV
- name: Run examples
run: |
python3 example.py --dry-run --only-target=${{ matrix.target }}
Expand All @@ -29,10 +32,15 @@ jobs:
github.event.pull_request.user.login == 'dop-amin' ||
github.event.pull_request.user.login == 'mkannwischer'
}}
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-ubuntu
- uses: ./.github/actions/setup-macos
- name: Install python dependencies
run: |
python3 -m venv venv
./venv/bin/python3 -m pip install -r requirements.txt
echo BASH_ENV="./venv/bin/activate" >> $GITHUB_ENV
- name: Run tutorial
run: |
(cd tutorial && ./tutorial_all.sh)
Expand All @@ -42,10 +50,15 @@ jobs:
github.event.pull_request.user.login == 'dop-amin' ||
github.event.pull_request.user.login == 'mkannwischer'
}}
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-ubuntu
- uses: ./.github/actions/setup-macos
- name: Install python dependencies
run: |
python3 -m venv venv
./venv/bin/python3 -m pip install -r requirements.txt
echo BASH_ENV="./venv/bin/activate" >> $GITHUB_ENV
- name: Run examples
run: |
python3 example.py --examples simple0,simple1,simple0_loop,simple1_loop
Expand All @@ -55,10 +68,15 @@ jobs:
github.event.pull_request.user.login == 'dop-amin' ||
github.event.pull_request.user.login == 'mkannwischer'
}}
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-ubuntu
- uses: ./.github/actions/setup-macos
- name: Install python dependencies
run: |
python3 -m venv venv
./venv/bin/python3 -m pip install -r requirements.txt
echo BASH_ENV="./venv/bin/activate" >> $GITHUB_ENV
- name: Run examples
run: |
python3 example.py --examples ntt_kyber_1_23_45_67_m55,ntt_dilithium_12_34_56_78_m55 --timeout=1200
Expand All @@ -68,10 +86,15 @@ jobs:
github.event.pull_request.user.login == 'dop-amin' ||
github.event.pull_request.user.login == 'mkannwischer'
}}
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-ubuntu
- uses: ./.github/actions/setup-macos
- name: Install python dependencies
run: |
python3 -m venv venv
./venv/bin/python3 -m pip install -r requirements.txt
echo BASH_ENV="./venv/bin/activate" >> $GITHUB_ENV
- name: Run examples
run: |
python3 example.py --examples ntt_kyber_123_4567_a55,ntt_dilithium_123_45678_a55 --timeout=1200
Expand All @@ -81,10 +104,15 @@ jobs:
github.event.pull_request.user.login == 'dop-amin' ||
github.event.pull_request.user.login == 'mkannwischer'
}}
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-ubuntu
- uses: ./.github/actions/setup-macos
- name: Install python dependencies
run: |
python3 -m venv venv
./venv/bin/python3 -m pip install -r requirements.txt
echo BASH_ENV="./venv/bin/activate" >> $GITHUB_ENV
- name: Run examples
run: |
(cd paper/scripts && NO_LOG=Y ./slothy_sqmag.sh)
Expand All @@ -94,10 +122,15 @@ jobs:
github.event.pull_request.user.login == 'dop-amin' ||
github.event.pull_request.user.login == 'mkannwischer'
}}
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-ubuntu
- uses: ./.github/actions/setup-macos
- name: Install python dependencies
run: |
python3 -m venv venv
./venv/bin/python3 -m pip install -r requirements.txt
echo BASH_ENV="./venv/bin/activate" >> $GITHUB_ENV
- name: Run examples
run: |
(cd paper/scripts && NO_LOG=Y ./slothy_fft.sh)

0 comments on commit 65c0ac7

Please sign in to comment.