Skip to content

Commit

Permalink
Merge pull request #166 from specs-feup/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
lm-sousa authored Sep 28, 2024
2 parents 325bb3f + 8d9fd26 commit c6f9015
Show file tree
Hide file tree
Showing 231 changed files with 1,606 additions and 1,594 deletions.
69 changes: 0 additions & 69 deletions .github/workflows/ant-lara-2.0-legacy.yml

This file was deleted.

49 changes: 32 additions & 17 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# This workflow will build a Java project with Ant
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant
# This workflow will build a the whole project every day at midnight
# It will build the Java part and the JS part
# Every push to a branch will trigger the build
# Every pull request will trigger the build

name: Java
name: nightly

on:
push:
Expand All @@ -17,15 +19,17 @@ permissions:

env:
JAVA_VERSION: 17
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
DEFAULT_BRANCH: ${{ github.base_ref || 'master' }}

jobs:
build-java:
name: Build Java
runs-on: ubuntu-latest

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
DEFAULT_BRANCH: ${{ github.base_ref || 'master' }}
outputs:
branch-exists-lara-framework: ${{ steps.Branch-lara-framework.outputs.value }}
branch-exists-specs-java-libs: ${{ steps.Branch-specs-java-libs.outputs.value }}

steps:
- name: Setup Java
Expand All @@ -47,31 +51,45 @@ jobs:

- name: Check if branch exists on lara-framework
id: Branch-lara-framework
run: git ls-remote --heads https://github.com/specs-feup/lara-framework.git refs/heads/${{ env.BRANCH_NAME }} | wc -l
run: echo "value=$(git ls-remote --heads https://github.com/specs-feup/lara-framework.git refs/heads/${{ env.BRANCH_NAME }} | wc -l)" >> $GITHUB_OUTPUT

- name: Check if branch exists on specs-java-libs
id: Branch-specs-java-libs
run: git ls-remote --heads https://github.com/specs-feup/specs-java-libs.git refs/heads/${{ env.BRANCH_NAME }} | wc -l
run: echo "value=$(git ls-remote --heads https://github.com/specs-feup/specs-java-libs.git refs/heads/${{ env.BRANCH_NAME }} | wc -l)" >> $GITHUB_OUTPUT

- name: Echo checks
run: |
echo "Branch-lara-framework: ${{ steps.Branch-lara-framework.outputs.value }}"
echo "Branch-specs-java-libs: ${{ steps.Branch-specs-java-libs.outputs.value }}"
echo "Branch name: ${{ env.BRANCH_NAME }}"
echo "Default branch: ${{ env.DEFAULT_BRANCH }}"
- name: Checkout lara-framework
uses: actions/checkout@v4
with:
repository: specs-feup/lara-framework
path: lara-framework
ref: ${{ steps.Branch-lara-framework.outputs.stdout == '1' && env.BRANCH_NAME || env.DEFAULT_BRANCH }}
ref: ${{ steps.Branch-lara-framework.outputs.value == '1' && env.BRANCH_NAME || env.DEFAULT_BRANCH }}

- name: Checkout specs-java-libs
uses: actions/checkout@v4
with:
repository: specs-feup/specs-java-libs
path: specs-java-libs
ref: ${{ steps.Branch-specs-java-libs.outputs.stdout == '1' && env.BRANCH_NAME || env.DEFAULT_BRANCH }}
ref: ${{ steps.Branch-specs-java-libs.outputs.value == '1' && env.BRANCH_NAME || env.DEFAULT_BRANCH }}

- name: Build with Gradle
run: |
cd clava/ClavaWeaver
gradle installDist
- name: Test with Gradle
run: |
cd clava/ClavaWeaver
gradle test
env:
GITHUB_DEPENDENCY_GRAPH_ENABLED: false

- name: Upload ClavaWeaver artifacts
uses: actions/upload-artifact@v4
with:
Expand All @@ -85,7 +103,8 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: ['latest']
#node-version: ['latest', '20.x', '18.x']
node-version: ['20.x', '18.x']
os: [ubuntu-latest, windows-latest, macos-latest]

runs-on: ${{ matrix.os }}
Expand All @@ -107,16 +126,12 @@ jobs:
with:
path: clava

- name: Check if branch exists on lara-framework
id: Branch-lara-framework
run: git ls-remote --heads https://github.com/specs-feup/lara-framework.git refs/heads/${{ env.BRANCH_NAME }} | wc -l

- name: Checkout lara-framework
uses: actions/checkout@v4
with:
repository: specs-feup/lara-framework
path: lara-framework
ref: ${{ steps.Branch-lara-framework.outputs.stdout == '1' && env.BRANCH_NAME || env.DEFAULT_BRANCH }}
ref: ${{ needs.build-java.outputs.branch-exists-lara-framework == '1' && env.BRANCH_NAME || env.DEFAULT_BRANCH }}

- name: Setup js workspace
run: |
Expand Down
22 changes: 7 additions & 15 deletions ClangAstParser/test/eu/antarex/clang/parser/AClangAstTester.java
Original file line number Diff line number Diff line change
@@ -1,31 +1,20 @@
/**
* Copyright 2016 SPeCS.
*
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
*
* <p>
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License. under the License.
*/

package eu.antarex.clang.parser;

import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import pt.up.fe.specs.clang.codeparser.CodeParser;
import pt.up.fe.specs.clang.codeparser.ParallelCodeParser;
import pt.up.fe.specs.clang.dumper.ClangAstDumper;
Expand All @@ -37,6 +26,10 @@
import pt.up.fe.specs.util.SpecsSystem;
import pt.up.fe.specs.util.providers.ResourceProvider;

import java.io.File;
import java.util.*;
import java.util.stream.Collectors;

public abstract class AClangAstTester {

private static final boolean CLEAN_CLANG_FILES = true;
Expand Down Expand Up @@ -183,7 +176,6 @@ public static void clear() throws Exception {

}

@Test
public void testProper() {
// Parse files

Expand Down
6 changes: 3 additions & 3 deletions ClangAstParser/test/eu/antarex/clang/parser/CTester.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* Copyright 2017 SPeCS.
*
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
*
* <p>
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License. under the License.
Expand Down
4 changes: 2 additions & 2 deletions Clava-JS/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
"build:code": "tsc -b src-code",
"build:watch": "npm run build -- --watch",
"lint": "eslint .",
"test": "cross-env NODE_OPTIONS='$NODE_OPTIONS --experimental-vm-modules' jest --detectOpenHandles --forceExit",
"test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --detectOpenHandles --forceExit",
"test:api": "npm run test -- src-api",
"test:code": "npm run test -- src-code",
"test:cov": "npm run test -- --coverage",
"test:watch": "npm run test -- --watch",
"java-dist": "npx lara-java-dist --jsSourceFolder api --jsDestinationFolder ../ClavaLaraApi/src-lara/clava/ --javaClassname ClavaApiJsResource --javaPackageName pt.up.fe.specs.clava.weaver --javaDestinationFolder ../ClavaLaraApi/src-java/pt/up/fe/specs/clava/weaver/ --javaResourceNamespace clava",
"build-interfaces": "npx lara-build-interfaces --input ../ClavaWeaver/src/pt/up/fe/specs/clava/weaver/CxxWeaver.json --lara lara-js/LaraJoinPointSpecification.json --output src-api/Joinpoints.ts"
"build-interfaces": "npx lara-build-interfaces --input ../ClavaWeaver/src/pt/up/fe/specs/clava/weaver/CxxWeaver.json --lara @specs-feup/lara/LaraJoinPointSpecification.json --output src-api/Joinpoints.ts"
},
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit c6f9015

Please sign in to comment.