Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Quaigh #50

Merged
merged 8 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 17 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,32 @@ on:
pull_request:

jobs:
test:
name: Test/Nix
runs-on: macos-14
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix build
push_to_pypi:
name: Build/Publish Docker
runs-on: ubuntu-20.04
name: Build
needs: [test]
runs-on: ubuntu-24.04
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Export Repo URL
run: echo "REPO_URL=https://github.com/${{ github.repository }}" >> $GITHUB_ENV
- name: Export Branch Name
run: echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
uses: actions/checkout@v3
- name: Set default for env.NEW_TAG
run: echo "NEW_TAG=NO_NEW_TAG" >> $GITHUB_ENV
- name: Write Hash
run: |
echo "GIT_COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Build Image
run: |
docker build --target runner -t aucohl/fault:latest .
- name: Check for new version
if: ${{ env.BRANCH_NAME == 'main' }}
run: |
python3 .github/scripts/generate_tag.py
- name: Log in to the Container registry
if: ${{ env.BRANCH_NAME == 'main' }}
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push to GHCR (Commit)
if: ${{ env.BRANCH_NAME == 'main' }}
run: |
docker image tag aucohl/fault:latest ghcr.io/aucohl/fault:${{ env.GIT_COMMIT_HASH }}
docker push ghcr.io/aucohl/fault:${{ env.GIT_COMMIT_HASH }}
- name: Push to GHCR (Tag)
if: ${{ env.NEW_TAG != 'NO_NEW_TAG' }}
run: |
docker image tag aucohl/fault:latest ghcr.io/aucohl/fault:latest
docker image tag aucohl/fault:latest ghcr.io/aucohl/fault:$NEW_TAG
docker push ghcr.io/aucohl/fault:$NEW_TAG
docker push ghcr.io/aucohl/fault:latest
# Last, because this triggers the AppImage CI
- name: Tag Commit
if: ${{ env.NEW_TAG != 'NO_NEW_TAG' }}
uses: tvdias/[email protected]
Expand Down
106 changes: 0 additions & 106 deletions Dockerfile

This file was deleted.

10 changes: 3 additions & 7 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import PackageDescription
let package = Package(
name: "Fault",
platforms: [
.macOS(.v11), // executableURL and a bunch of other things are not available before High Sierra
.macOS(.v13), // executableURL and a bunch of other things are not available before High Sierra
],
dependencies: [
// Dependencies declare other packages that this package depends on.
Expand All @@ -21,13 +21,9 @@ let package = Package(
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.executableTarget(
name: "Fault",
name: "fault",
dependencies: ["PythonKit", .product(name: "ArgumentParser", package: "swift-argument-parser"), "Defile", .product(name: "Collections", package: "swift-collections"), "BigInt", "Yams"],
path: "Sources"
),
.testTarget(
name: "FaultTests",
dependencies: ["Fault"]
),
)
]
)
178 changes: 0 additions & 178 deletions Sources/Fault/BenchCircuit.swift

This file was deleted.

2 changes: 1 addition & 1 deletion Sources/Fault/Compaction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ enum Compactor {
if sa0 == sa0Final, sa1 == sa1Final {
let ratio = (1 - (Float(filtered.count) / Float(tvCount))) * 100
print("Initial TV Count: \(tvCount). Compacted TV Count: \(filtered.count). ")
print("Compaction is successfuly concluded with a reduction percentage of : \(String(format: "%.2f", ratio))% .\n")
print("Successfully compacted test vectors by a ratio of \(String(format: "%.2f", ratio))%.")
} else {
print("Error: All faults aren't covered after compaction .\n")
}
Expand Down
Loading
Loading