35
.github/workflows/test.yml
vendored
Normal file
35
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
name: Test
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-20.04, macos-11.0]
|
||||||
|
rust-version: [stable, beta]
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: ${{ matrix.rust-version }}
|
||||||
|
override: true
|
||||||
|
- name: Build
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: rustc
|
||||||
|
args: --verbose -- -D warnings
|
||||||
|
- name: Test
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: --verbose --all
|
||||||
|
- name: Num tests
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: --verbose --all --no-default-features --features num
|
||||||
31
.travis.yml
31
.travis.yml
@@ -1,31 +0,0 @@
|
|||||||
language: rust
|
|
||||||
cache: cargo
|
|
||||||
os: linux
|
|
||||||
dist: xenial
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- cargo fetch
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
allow_failures:
|
|
||||||
env:
|
|
||||||
- CAN_FAIL=true
|
|
||||||
include:
|
|
||||||
- stage: "Stable: Build"
|
|
||||||
rust: stable
|
|
||||||
script: cargo rustc --verbose -- -D warnings
|
|
||||||
name: "Build Stable"
|
|
||||||
- stage: "Stable: Tests"
|
|
||||||
rust: stable
|
|
||||||
script: cargo test --verbose --all
|
|
||||||
name: "Tests Stable"
|
|
||||||
- stage: "Features"
|
|
||||||
rust: stable
|
|
||||||
script: cargo test --verbose --all --no-default-features --features num
|
|
||||||
name: "num Tests"
|
|
||||||
env: CAN_FAIL=true
|
|
||||||
- stage: "Beta: Build"
|
|
||||||
# - #
|
|
||||||
rust: beta
|
|
||||||
script: cargo rustc --verbose -- -D warnings
|
|
||||||
name: "Build Beta"
|
|
||||||
@@ -3130,10 +3130,15 @@ impl MachineState {
|
|||||||
) {
|
) {
|
||||||
let interrupted = INTERRUPT.load(std::sync::atomic::Ordering::Relaxed);
|
let interrupted = INTERRUPT.load(std::sync::atomic::Ordering::Relaxed);
|
||||||
|
|
||||||
if INTERRUPT.compare_and_swap(interrupted, false, std::sync::atomic::Ordering::Relaxed) {
|
match INTERRUPT.compare_exchange(interrupted, false, std::sync::atomic::Ordering::Relaxed, std::sync::atomic::Ordering::Relaxed) {
|
||||||
|
Ok(interruption) => {
|
||||||
|
if interruption {
|
||||||
self.throw_interrupt_exception();
|
self.throw_interrupt_exception();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
Err(_) => unreachable!()
|
||||||
|
}
|
||||||
|
|
||||||
let mut default_call_policy: Box<dyn CallPolicy> = Box::new(DefaultCallPolicy {});
|
let mut default_call_policy: Box<dyn CallPolicy> = Box::new(DefaultCallPolicy {});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user