From 770aab37a7f0ca3deef05ccca583bb9e5d42bfe3 Mon Sep 17 00:00:00 2001 From: xvzcf Date: Thu, 19 Oct 2023 11:33:21 -0400 Subject: [PATCH] Temporary: Debugging CI job. --- .github/workflows/checks.yml | 25 ---------- .github/workflows/hax.yml | 69 -------------------------- .github/workflows/rust.yml | 96 ++---------------------------------- .github/workflows/specs.yml | 50 ------------------- sys/platform/src/lib.rs | 3 +- 5 files changed, 5 insertions(+), 238 deletions(-) delete mode 100644 .github/workflows/checks.yml delete mode 100644 .github/workflows/hax.yml delete mode 100644 .github/workflows/specs.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml deleted file mode 100644 index 5fab6fabd..000000000 --- a/.github/workflows/checks.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Checks - -on: - push: - branches: ["main", "dev"] - pull_request: - branches: ["main", "dev"] - workflow_dispatch: - -env: - CARGO_TERM_COLOR: always - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - fmt: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: ๐Ÿงน Cargo fmt - run: cargo fmt --all -- --check diff --git a/.github/workflows/hax.yml b/.github/workflows/hax.yml deleted file mode 100644 index 74b44ef43..000000000 --- a/.github/workflows/hax.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: hax - -on: - push: - branches: ["dev"] - paths: - - 'specs/kyber/src/**' - - 'src/kem/kyber768/**' - - 'src/kem/kyber768.rs' - pull_request: - branches: ["dev"] - paths: - - 'specs/kyber/src/**' - - 'src/kem/kyber768/**' - - 'src/kem/kyber768.rs' - workflow_dispatch: - -env: - CARGO_TERM_COLOR: always - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - hax: - runs-on: "ubuntu-latest" - - steps: - - uses: actions/checkout@v4 - - - name: ๐Ÿ”จ OCaml Setup - uses: ocaml/setup-ocaml@v2 - with: - ocaml-compiler: 4.14.1 - - - name: โคต Clone hax repository - uses: actions/checkout@v4 - with: - repository: hacspec/hacspec-v2 - path: hax - - - name: ๐Ÿ”จ Setup hax - working-directory: hax - run: | - sudo apt-get update - sudo apt-get install --yes nodejs - ./setup.sh - - - name: ๐Ÿƒ๐Ÿปโ€โ™€๏ธ Run hax extraction - run: | - eval $(opam env) - ./extract_to_fstar.py --kyber-reference - # Extract the functions in the compress module individually to test - # the function-extraction code. - # Extract functions from the remaining modules to test the - # module-extraction code. - ./extract_to_fstar.py --crate-path specs/kyber \ - --functions hacspec_kyber::compress::compress \ - hacspec_kyber::compress::decompress \ - hacspec_kyber::compress::compress_d \ - hacspec::kyber::compress::decompress_d \ - --modules ind_cpa \ - hacspec_kyber \ - matrix ntt \ - parameters \ - sampling \ - serialize \ - --exclude-modules libcrux::hacl::sha3 libcrux::digest diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 38d11b129..28e4c4643 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -19,17 +19,9 @@ jobs: strategy: fail-fast: false matrix: - bits: [32, 64] + bits: [64] os: - - macos-latest - - ubuntu-latest - - windows-latest - exclude: - - bits: 32 - os: "macos-latest" - # FIXME: Linking isn't working here yet for hacl #42 - - bits: 32 - os: "windows-latest" + - macos-13 runs-on: ${{ matrix.os }} defaults: @@ -42,95 +34,13 @@ jobs: - run: echo "RUST_TARGET_FLAG=" > $GITHUB_ENV if: ${{ matrix.bits == 64 }} - - name: โš™๏ธ Setup Ubuntu x86 - if: ${{ matrix.bits == 32 && matrix.os == 'ubuntu-latest' }} - run: | - rustup target add i686-unknown-linux-gnu - sudo apt-get update - sudo apt-get install -y gcc-multilib g++-multilib - - - name: โš™๏ธ Setup Ubuntu x64 - if: ${{ matrix.bits == 64 && matrix.os == 'ubuntu-latest' }} - run: | - rustup target add aarch64-unknown-linux-gnu - - name: โš™๏ธ Setup macOS if: ${{ matrix.os == 'macos-latest' }} run: | rustup target add aarch64-apple-darwin - # Set up 32 bit systems - - - name: ๐Ÿ› ๏ธ Config Windows x86 - run: echo "RUST_TARGET_FLAG=--target=i686-pc-windows-msvc" > $GITHUB_ENV - if: ${{ matrix.bits == 32 && matrix.os == 'windows-latest' }} - - - name: ๐Ÿ› ๏ธ Config Linux x86 - run: | - echo "RUST_TARGET_FLAG=--target=i686-unknown-linux-gnu" > $GITHUB_ENV - if: ${{ matrix.bits == 32 && matrix.os == 'ubuntu-latest' }} - - # Set up windows - - - name: โš™๏ธ Setup Windows x86 - if: ${{ matrix.bits == 32 && matrix.os == 'windows-latest' }} - shell: pwsh - run: | - echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append - vcpkg install openssl:x86-windows-static-md - - - name: โš™๏ธ Setup Windows x64 - if: ${{ matrix.bits == 64 && matrix.os == 'windows-latest' }} - shell: pwsh - run: | - echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append - vcpkg install openssl:x64-windows-static-md - - # Build ... - - - name: ๐Ÿ”จ Build - run: cargo build --verbose $RUST_TARGET_FLAG - - - name: ๐Ÿ”จ Build Release - run: cargo build --verbose --release $RUST_TARGET_FLAG - # Cross compilation - name: ๐Ÿ”จ Build aarch64 macOS if: ${{ matrix.os == 'macos-latest' }} - run: cargo build --verbose --target aarch64-apple-darwin - - # TODO: #42 linking fails here for some reason - # - name: Build aarch64 Ubuntu - # if: ${{ matrix.bits == 64 && matrix.os == 'ubuntu-latest' }} - # run: CC=clang cargo build --verbose --target aarch64-unknown-linux-gnu - - # Test ... - - - name: ๐Ÿƒ๐Ÿปโ€โ™€๏ธ Test - run: cargo test --verbose $RUST_TARGET_FLAG - - - name: ๐Ÿƒ๐Ÿปโ€โ™€๏ธ Test Release - run: cargo test --verbose --release $RUST_TARGET_FLAG - - - name: ๐Ÿ”จ Build sys/hacl - working-directory: sys/hacl - run: cargo build --verbose $RUST_TARGET_FLAG - - wasm: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - uses: mymindstorm/setup-emsdk@ab889da2abbcbb280f91ec4c215d3bb4f3a8f775 - - - name: Setup - run: | - rustup target add wasm32-unknown-unknown - cargo install wasm-pack - - - name: ๐Ÿ”จ Build - run: CC=emcc AR=emar cargo build --features wasm --target wasm32-unknown-unknown - - - name: ๐Ÿƒ๐Ÿปโ€โ™€๏ธ Test - run: CC=emcc AR=emar wasm-pack test --node --features wasm + run: cargo build --verbose --release --target aarch64-apple-darwin diff --git a/.github/workflows/specs.yml b/.github/workflows/specs.yml deleted file mode 100644 index 043d3d801..000000000 --- a/.github/workflows/specs.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Specs - -on: - push: - branches: [ "main", "dev" ] - pull_request: - branches: [ "main", "dev" ] - -env: - CARGO_TERM_COLOR: always - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - strategy: - fail-fast: false - matrix: - os: - - macos-latest - - ubuntu-latest - - windows-latest - - runs-on: ${{ matrix.os }} - - steps: - - - name: Setup Ubuntu - if: matrix.os == 'ubuntu-latest' - run: sudo apt-get install ninja-build - - name: Setup MacOS - if: matrix.os == 'macos-latest' - run: brew install ninja - - name: Setup Windows - if: matrix.os == 'windows-latest' - run: | - echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append - vcpkg install openssl:x64-windows-static-md - - - uses: actions/checkout@v3 - - - name: Build - working-directory: specs - run: cargo build --verbose - - - name: Run tests - working-directory: specs - run: cargo test --verbose diff --git a/sys/platform/src/lib.rs b/sys/platform/src/lib.rs index 55dfcff7b..e8f93ca5d 100644 --- a/sys/platform/src/lib.rs +++ b/sys/platform/src/lib.rs @@ -56,7 +56,8 @@ pub fn simd128_support() -> bool { pub fn simd256_support() -> bool { #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] - return cpu_id::supported(Feature::avx2); + panic!("x86_64"); + //return cpu_id::supported(Feature::avx2); #[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))] false