Skip to content

Commit

Permalink
Temporary: Debugging CI job.
Browse files Browse the repository at this point in the history
  • Loading branch information
xvzcf committed Oct 19, 2023
1 parent 2d14fa9 commit 770aab3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 238 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/checks.yml

This file was deleted.

69 changes: 0 additions & 69 deletions .github/workflows/hax.yml

This file was deleted.

96 changes: 3 additions & 93 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
50 changes: 0 additions & 50 deletions .github/workflows/specs.yml

This file was deleted.

3 changes: 2 additions & 1 deletion sys/platform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 770aab3

Please sign in to comment.