Skip to content

[CI] update code

[CI] update code #1998

Workflow file for this run

name: rust
on:
push:
branches:
- main
- dev
- 'hacl-star-**'
paths-ignore:
- .gitignore
- CLA.md
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- cpu-features.md
- LICENSE
- LICENSE-APACHE
- README.md
pull_request:
# Can't use an YAML anchor because "Anchors are not currently supported." (GitHub 12/07/2022)
paths-ignore:
- .gitignore
- CLA.md
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- cpu-features.md
- LICENSE
- LICENSE-APACHE
- README.md
workflow_dispatch:
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
mach:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
# - ubuntu-latest Disabling Ubuntu for now as long as bindgen is broken
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo
- if: matrix.os == 'macos-latest'
run: brew install ninja
- if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install ninja-build
- if: matrix.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@7315a94840631165970262a99c72cfb48a65d25d
- if: matrix.os == 'windows-latest'
run: choco install ninja
- name: Cargo update
working-directory: rust
run: cargo update
- name: Debug Build
run: ./mach build -l rust -v
- name: Release Build
run: ./mach build --release -l rust -v
- name: Test Debug
# FIXME: enable Windows tests
if: matrix.os != 'windows-latest'
run: cargo test --manifest-path rust/Cargo.toml
env:
MACH_BUILD: 1
standalone:
strategy:
fail-fast: false
matrix:
bits: [32, 64]
os:
- macos-latest
# - ubuntu-latest disable for now
- windows-latest
exclude:
- bits: 32
os: "macos-latest"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo
- if: matrix.os == 'macos-latest'
run: brew install ninja
- if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install ninja-build gcc-multilib g++-multilib clang-15
rustup target add i686-unknown-linux-gnu
- name: Setup | Developer Command Prompt (x86)
if: ${{ matrix.bits == 32 && matrix.os == 'windows-latest' }}
uses: ilammy/msvc-dev-cmd@7315a94840631165970262a99c72cfb48a65d25d
with:
arch: x86
- name: Setup | Developer Command Prompt (x64)
if: ${{ matrix.bits == 64 && matrix.os == 'windows-latest' }}
uses: ilammy/msvc-dev-cmd@7315a94840631165970262a99c72cfb48a65d25d
with:
arch: x64
- if: matrix.os == 'windows-latest'
run: |
choco install ninja
rustup target add i686-pc-windows-msvc
- name: Cargo update
working-directory: rust
run: cargo update
- name: Debug Build
if: matrix.bits == 64
working-directory: rust
run: cargo build -v
- name: Release Build
if: matrix.bits == 64
working-directory: rust
run: cargo build --release -v
- name: Test Debug
if: matrix.bits == 64
working-directory: rust
run: cargo test -v
- name: Test Debug 32-bit
if: ${{ matrix.bits == 32 && matrix.os == 'ubuntu-latest' }}
working-directory: rust
run: cargo test -v --target i686-unknown-linux-gnu
- name: Test Debug 32-bit
if: ${{ matrix.bits == 32 && matrix.os == 'windows-latest' }}
working-directory: rust
run: |
../tools/vcbuild.cmd 32
cargo test -v --target i686-pc-windows-msvc