diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..308d70d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,45 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + JAVA_VERSION: 21 + +jobs: + test: + strategy: + fail-fast: false + matrix: + node-version: ['22.x'] + os: [ubuntu-latest, windows-2022, macos-latest] + + runs-on: ${{ matrix.os }} + + steps: + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: ${{ env.JAVA_VERSION }} + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + registry-url: 'https://registry.npmjs.org/' + + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install dependencies + run: npm install + + - name: Build the project + run: npm run build + + - name: Run tests + run: npm run test diff --git a/package.json b/package.json index 636a967..b158d0a 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "build:watch": "tsc --watch", "lint": "eslint .", "docs": "typedoc", + "test": "npm run test:predefined-tasks", "bench:apps": "clava dist/test/TestAppsSuite.js -ncg", "test:single-hotspot": "clava classic dist/test/TestSingleHotspot.js -p inputs/edgedetect/edge_detect.cpp -ncg", "test:predefined-tasks": "clava classic dist/test/TestPredefinedTasks.js -p inputs/edgedetect/edge_detect.cpp -ncg", @@ -37,8 +38,8 @@ "dependencies": { "@specs-feup/clava": "^3.0.8", "@specs-feup/clava-code-transforms": "^1.0.0", - "@specs-feup/clava-vitis-integration": "^1.0.0", - "@specs-feup/extended-task-graph": "^1.0.0", + "@specs-feup/clava-vitis-integration": "^1.1.0", + "@specs-feup/extended-task-graph": "^1.1.0", "@specs-feup/lara": "^3.0.5", "chalk": "^5.3.0", "csv-parser": "^3.2.0", diff --git a/test/TestSingleHotspot.ts b/test/TestSingleHotspot.ts index 156c6c0..0cb135a 100644 --- a/test/TestSingleHotspot.ts +++ b/test/TestSingleHotspot.ts @@ -11,4 +11,4 @@ const config = new HoopaConfig() .addBuiltinFpgaTarget(BuiltinFpgaTarget.ZCU102); const hoopa = new HoopaAPI("edge_detect", config, "outputs/local", "edgedetect"); -hoopa.runFromStart(false); \ No newline at end of file +hoopa.runFromStart(false);