From 3c47de9c17b17ee2902346e5379c2355a50400fd Mon Sep 17 00:00:00 2001 From: tolauwae Date: Fri, 13 Dec 2024 08:39:59 +0100 Subject: [PATCH] Move submodules --- .github/workflows/test.yml | 18 +++++++++--------- .gitmodules | 7 ++----- tests/{unit => }/artifacts/compile.output | 0 tests/{unit => }/artifacts/dump | 0 tests/{unit => }/artifacts/upload.wasm | Bin tests/{unit => }/artifacts/wabt | 0 tests/{unit => }/artifacts/warduino | 0 tests/unit/sourcemap.test.ts | 4 ++-- tsconfig.json | 5 +++-- 9 files changed, 16 insertions(+), 18 deletions(-) rename tests/{unit => }/artifacts/compile.output (100%) rename tests/{unit => }/artifacts/dump (100%) rename tests/{unit => }/artifacts/upload.wasm (100%) rename tests/{unit => }/artifacts/wabt (100%) rename tests/{unit => }/artifacts/warduino (100%) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4f59cc6..a52084b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: submodules: recursive - name: Get WABT commit ID - working-directory: tests/unit/artifacts/wabt + working-directory: tests/artifacts/wabt run: echo "WABT_VERSION=$(git rev-parse HEAD)" >> $GITHUB_ENV - name: Cache wabt @@ -19,13 +19,13 @@ jobs: id: cache-wabt with: key: ${{ runner.os }}-wabt-${{ env.WABT_VERSION }} - path: tests/unit/artifacts/wabt + path: tests/artifacts/wabt restore-keys: | ${{ runner.os }}-wabt- - name: Build WABT # Build latest version if: steps.cache-wabt.outputs.cache-hit == false - working-directory: tests/unit/artifacts/wabt + working-directory: tests/artifacts/wabt run: | mkdir build; cd build cmake .. @@ -35,7 +35,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: wabt-build-${{ github.run_id }} - path: tests/unit/artifacts/wabt/build + path: tests/artifacts/wabt/build build-wdcli: name: Build WARDuino CLI @@ -46,7 +46,7 @@ jobs: submodules: recursive - name: Get WDCLI commit ID - working-directory: tests/unit/artifacts/warduino + working-directory: tests/artifacts/warduino run: echo "WDCLI_VERSION=$(git rev-parse HEAD)" >> $GITHUB_ENV - name: Cache WARDuino CLI @@ -54,13 +54,13 @@ jobs: id: cache-warduino with: key: ${{ runner.os }}-warduino-${{ env.WDCLI_VERSION }} - path: tests/unit/artifacts/warduino + path: tests/artifacts/warduino restore-keys: | ${{ runner.os }}-warduino- - name: Build WARDuino CLI # Build latest version if: steps.cache-warduino.outputs.cache-hit == false - working-directory: tests/unit/artifacts/warduino + working-directory: tests/artifacts/warduino run: | mkdir build; cd build cmake .. -D BUILD_EMULATOR=ON @@ -70,7 +70,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: warduino-build-${{ github.run_id }} - path: tests/unit/artifacts/warduino/build + path: tests/artifacts/warduino/build unit: name: Unit tests @@ -177,7 +177,7 @@ jobs: echo "LINE_COVERAGE=$(npm run coverage:test:ava | grep -E 'Lines\s*:\s*[0-9]+(\.[0-9]+)?%' | awk '{print $3}' | tr -d '%')" >> $GITHUB_ENV - name: Report coverage - run: npx c8 report + run: npx c8 report --all - name: Update coverage badge uses: schneegans/dynamic-badges-action@v1.7.0 diff --git a/.gitmodules b/.gitmodules index 0a5efa2..463c443 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,6 @@ -[submodule "WABT"] - path = WABT - url = git@github.com:TOPLLab/wabt.git [submodule "tests/unit/artifacts/wabt"] - path = tests/unit/artifacts/wabt + path = tests/artifacts/wabt url = git@github.com:TOPLLab/wabt.git [submodule "tests/unit/artifacts/warduino"] - path = tests/unit/artifacts/warduino + path = tests/artifacts/warduino url = git@github.com:TOPLLab/WARDuino.git diff --git a/tests/unit/artifacts/compile.output b/tests/artifacts/compile.output similarity index 100% rename from tests/unit/artifacts/compile.output rename to tests/artifacts/compile.output diff --git a/tests/unit/artifacts/dump b/tests/artifacts/dump similarity index 100% rename from tests/unit/artifacts/dump rename to tests/artifacts/dump diff --git a/tests/unit/artifacts/upload.wasm b/tests/artifacts/upload.wasm similarity index 100% rename from tests/unit/artifacts/upload.wasm rename to tests/artifacts/upload.wasm diff --git a/tests/unit/artifacts/wabt b/tests/artifacts/wabt similarity index 100% rename from tests/unit/artifacts/wabt rename to tests/artifacts/wabt diff --git a/tests/unit/artifacts/warduino b/tests/artifacts/warduino similarity index 100% rename from tests/unit/artifacts/warduino rename to tests/artifacts/warduino diff --git a/tests/unit/sourcemap.test.ts b/tests/unit/sourcemap.test.ts index 8592b2d..2e46b01 100644 --- a/tests/unit/sourcemap.test.ts +++ b/tests/unit/sourcemap.test.ts @@ -5,7 +5,7 @@ import {SourceMap} from '../../src/sourcemap/SourceMap'; import {WABT} from '../../src/util/env'; import {mkdtempSync, readFileSync, copyFileSync} from 'fs'; -const artifacts = `${__dirname}/../../../tests/unit/artifacts`; +const artifacts = `${__dirname}/../../../tests/artifacts`; test('test wasm/leb128', t => { t.is(WASM.leb128(0), '00'); @@ -28,4 +28,4 @@ test('test WatMapper/extractLineInfo', async t => { const mapper: WatMapper = new WatMapper(dummy, initialize(), WABT); const mapping: SourceMap.Mapping = await mapper.mapping(); t.true(mapping.lines.length > 0); -}); \ No newline at end of file +}); diff --git a/tsconfig.json b/tsconfig.json index e01c580..99b39c1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,9 +16,10 @@ "allowJs": true }, "exclude": [ - "WABT", + "wabt", "node_modules", "dist", - "tests/examples" + "tests/examples", + "warduino" ] }