Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
merge: PR #77 from chore/47-migrate-solidhunter-staging
Browse files Browse the repository at this point in the history
47 - Migrate solidhunter
  • Loading branch information
0xmemorygrinder authored Sep 9, 2023
2 parents 6309e59 + 98f8847 commit 9bc261d
Show file tree
Hide file tree
Showing 106 changed files with 9,664 additions and 6,751 deletions.
41 changes: 33 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,38 @@ jobs:
from: ${{ github.head_ref }}
since: ${{ github.base_ref }}

lint:
flatten-deps:
runs-on: ubuntu-latest
needs: setup
outputs:
dependencies: ${{ toJson(fromJson(steps.flatten.outputs.result).dependencies) }}
steps:
- uses: actions/github-script@v6
id: flatten
with:
script: |
const rawExtensions = `${{ needs.setup.outputs.extensions }}`
const rawLibraries = `${{ needs.setup.outputs.libraries }}`
const rawPackages = `${{ needs.setup.outputs.packages }}`
const extensions = JSON.parse(rawExtensions)
const libraries = JSON.parse(rawLibraries)
const packages = JSON.parse(rawPackages)
console.log(extensions, libraries, packages);
const deps = [...extensions, ...libraries, ...packages]
return {
dependencies: deps
}
lint:
runs-on: ubuntu-latest
needs: flatten-deps
strategy:
fail-fast: false
matrix:
workspace: ${{ fromJson(needs.setup.outputs.workspaces) }}
workspace: ${{ fromJson(needs.flatten-deps.outputs.dependencies) }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand All @@ -31,11 +56,11 @@ jobs:

format:
runs-on: ubuntu-latest
needs: setup
needs: flatten-deps
strategy:
fail-fast: false
matrix:
workspace: ${{ fromJson(needs.setup.outputs.workspaces) }}
workspace: ${{ fromJson(needs.flatten-deps.outputs.dependencies) }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand All @@ -49,11 +74,11 @@ jobs:

build:
runs-on: ubuntu-latest
needs: setup
needs: flatten-deps
strategy:
fail-fast: false
matrix:
workspace: ${{ fromJson(needs.setup.outputs.workspaces) }}
workspace: ${{ fromJson(needs.flatten-deps.outputs.dependencies) }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand All @@ -67,11 +92,11 @@ jobs:

test:
runs-on: ubuntu-latest
needs: setup
needs: flatten-deps
strategy:
fail-fast: false
matrix:
workspace: ${{ fromJson(needs.setup.outputs.workspaces) }}
workspace: ${{ fromJson(needs.flatten-deps.outputs.dependencies) }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down
26 changes: 23 additions & 3 deletions .github/workflows/detect-workspace-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ on:
extensions:
description: "Array of affected extensions workspaces"
value: ${{ jobs.detect_changes.outputs.extensions }}
libraries:
description: "Array of affected libraries workspaces"
value: ${{ jobs.detect_changes.outputs.libraries }}
packages:
description: "Array of affected packages workspaces"
value: ${{ jobs.detect_changes.outputs.packages }}

jobs:
detect_changes:
Expand All @@ -27,6 +33,8 @@ jobs:
workspaces: ${{ toJson(fromJson(steps.build-array.outputs.result).affectedWorkspaces) }}
toolchains: ${{ toJson(fromJson(steps.build-array.outputs.result).toolchainsWorkspaces) }}
extensions: ${{ toJson(fromJson(steps.build-array.outputs.result).extensionsWorkspaces) }}
libraries: ${{ toJson(fromJson(steps.build-array.outputs.result).librariesWorkspaces) }}
packages: ${{ toJson(fromJson(steps.build-array.outputs.result).packagesWorkspaces) }}
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -70,15 +78,23 @@ jobs:
})
console.log(affectedWorkspaces)
const toolchainsWorkspaces = affectedWorkspaces.filter(workspace => {
return workspace.name.endsWith('-toolchain')
return workspace.name.startsWith('@osmium-toolchains/')
})
const librariesWorkspaces = affectedWorkspaces.filter(workspace => {
return workspace.name.startsWith('@osmium-libs/')
})
const packagesWorkspaces = affectedWorkspaces.filter(workspace => {
return workspace.name.startsWith('@osmium-packages/')
})
const extensionsWorkspaces = affectedWorkspaces.filter(workspace => {
return workspace.name.match(/osmium-(?!packages)(?:manager|(?:\w+-(?!toolchain)(?!\w+-\w+)))/)
return workspace.name.match(/@osmium\/(?:manager|(?!\w+-\w+-\w+)(?:\w+-\w+))/)
})
return {
affectedWorkspaces,
toolchainsWorkspaces,
extensionsWorkspaces
extensionsWorkspaces,
librariesWorkspaces,
packagesWorkspaces
}
- name: debug
Expand All @@ -88,5 +104,9 @@ jobs:
echo "Toolchains workspaces: ${{ toJson(fromJson(steps.build-array.outputs.result).toolchainsWorkspaces) }}"
echo "------------------------------------"
echo "Extensions workspaces: ${{ toJson(fromJson(steps.build-array.outputs.result).extensionsWorkspaces) }}"
echo "------------------------------------"
echo "Libraries workspaces: ${{ toJson(fromJson(steps.build-array.outputs.result).librariesWorkspaces) }}"
echo "------------------------------------"
echo "Packages workspaces: ${{ toJson(fromJson(steps.build-array.outputs.result).packagesWorkspaces) }}"

Empty file modified .husky/post-rewrite
100644 → 100755
Empty file.
Empty file modified .husky/pre-commit
100644 → 100755
Empty file.
Loading

0 comments on commit 9bc261d

Please sign in to comment.