mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-15 23:56:29 +03:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4dfde469c | ||
|
|
6099995338 | ||
|
|
45ad3c49e5 |
@@ -28,7 +28,7 @@ jobs:
|
|||||||
- { os: windows-latest, target: x86_64-pc-windows-msvc, short: windows-x64 }
|
- { os: windows-latest, target: x86_64-pc-windows-msvc, short: windows-x64 }
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
- name: Check the tag matches ENGINE_VERSION
|
- name: Check the tag matches ENGINE_VERSION
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -51,7 +51,7 @@ jobs:
|
|||||||
if: ${{ !matrix.cross }}
|
if: ${{ !matrix.cross }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: target/${{ matrix.target }}/release/impeccable${{ runner.os == 'Windows' && '.exe' || '' }} engine-probe
|
run: target/${{ matrix.target }}/release/impeccable${{ runner.os == 'Windows' && '.exe' || '' }} engine-probe
|
||||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||||
with:
|
with:
|
||||||
name: impeccable-${{ matrix.short }}
|
name: impeccable-${{ matrix.short }}
|
||||||
path: target/${{ matrix.target }}/release/impeccable${{ runner.os == 'Windows' && '.exe' || '' }}
|
path: target/${{ matrix.target }}/release/impeccable${{ runner.os == 'Windows' && '.exe' || '' }}
|
||||||
@@ -60,7 +60,7 @@ jobs:
|
|||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
||||||
with: { path: artifacts }
|
with: { path: artifacts }
|
||||||
- name: Lay out release assets with checksums
|
- name: Lay out release assets with checksums
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -687,11 +687,17 @@ mod tests_660 {
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
static TMP_SEQ: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0);
|
||||||
|
|
||||||
fn tmp() -> String {
|
fn tmp() -> String {
|
||||||
let base = std::env::temp_dir().join(format!(
|
let base = std::env::temp_dir().join(format!(
|
||||||
"impeccable-critique-{}-{}",
|
"impeccable-critique-{}-{}-{}",
|
||||||
std::process::id(),
|
std::process::id(),
|
||||||
std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap().as_nanos()
|
std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap().as_nanos(),
|
||||||
|
// A per-process counter: Windows' clock is coarse enough that two
|
||||||
|
// parallel tests can share a nanosecond stamp and then delete each
|
||||||
|
// other's directories.
|
||||||
|
TMP_SEQ.fetch_add(1, std::sync::atomic::Ordering::Relaxed)
|
||||||
));
|
));
|
||||||
std::fs::create_dir_all(&base).unwrap();
|
std::fs::create_dir_all(&base).unwrap();
|
||||||
// Like Node's `realpathSync`: no `\\?\` verbatim prefix on Windows,
|
// Like Node's `realpathSync`: no `\\?\` verbatim prefix on Windows,
|
||||||
|
|||||||
@@ -437,11 +437,17 @@ pub fn load_known_rule_ids() -> Option<Vec<String>> {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::check_hook_installation;
|
use super::check_hook_installation;
|
||||||
|
|
||||||
|
static TMP_SEQ: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0);
|
||||||
|
|
||||||
fn tmp() -> String {
|
fn tmp() -> String {
|
||||||
let base = std::env::temp_dir().join(format!(
|
let base = std::env::temp_dir().join(format!(
|
||||||
"impeccable-doctor-hook-{}-{}",
|
"impeccable-doctor-hook-{}-{}-{}",
|
||||||
std::process::id(),
|
std::process::id(),
|
||||||
std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap().as_nanos()
|
std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap().as_nanos(),
|
||||||
|
// A per-process counter: Windows' clock is coarse enough that two
|
||||||
|
// parallel tests can share a nanosecond stamp and then delete each
|
||||||
|
// other's directories.
|
||||||
|
TMP_SEQ.fetch_add(1, std::sync::atomic::Ordering::Relaxed)
|
||||||
));
|
));
|
||||||
std::fs::create_dir_all(&base).unwrap();
|
std::fs::create_dir_all(&base).unwrap();
|
||||||
// Like Node's `realpathSync`: on Windows, `canonicalize` yields a
|
// Like Node's `realpathSync`: on Windows, `canonicalize` yields a
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ use impeccable_hook::hook_lib::{get_cache_path, get_pending_path, Runtime};
|
|||||||
use impeccable_hook::hook;
|
use impeccable_hook::hook;
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
|
||||||
|
static TMP_SEQ: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0);
|
||||||
|
|
||||||
static HTML: MissingHtmlEngine = MissingHtmlEngine;
|
static HTML: MissingHtmlEngine = MissingHtmlEngine;
|
||||||
static ENV_LOCK: Mutex<()> = Mutex::new(());
|
static ENV_LOCK: Mutex<()> = Mutex::new(());
|
||||||
|
|
||||||
@@ -47,9 +49,13 @@ struct Tmp(PathBuf);
|
|||||||
impl Tmp {
|
impl Tmp {
|
||||||
fn new() -> Tmp {
|
fn new() -> Tmp {
|
||||||
let base = std::env::temp_dir().join(format!(
|
let base = std::env::temp_dir().join(format!(
|
||||||
"impeccable-cache-root-{}-{}",
|
"impeccable-cache-root-{}-{}-{}",
|
||||||
std::process::id(),
|
std::process::id(),
|
||||||
std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap().as_nanos()
|
std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap().as_nanos(),
|
||||||
|
// A per-process counter: Windows' clock is coarse enough that two
|
||||||
|
// parallel tests can share a nanosecond stamp and then delete each
|
||||||
|
// other's directories.
|
||||||
|
TMP_SEQ.fetch_add(1, std::sync::atomic::Ordering::Relaxed)
|
||||||
));
|
));
|
||||||
std::fs::create_dir_all(&base).unwrap();
|
std::fs::create_dir_all(&base).unwrap();
|
||||||
// Like Node's `realpathSync`: no `\\?\` verbatim prefix on Windows, so the
|
// Like Node's `realpathSync`: no `\\?\` verbatim prefix on Windows, so the
|
||||||
|
|||||||
Reference in New Issue
Block a user