-
Notifications
You must be signed in to change notification settings - Fork 1
Multi-weaver #65
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
Open
Open
Multi-weaver #65
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2f58f18
Refactor Metafor to remove dependency on THREAD_LOCAL_WEAVER
lm-sousa 1260d7d
Fix CI workflows and linter config
lm-sousa 0b3cba2
Update package version and dependencies in package.json
lm-sousa c3fc453
Update FFile constructor to include FortranWeaver
lm-sousa 4a5860c
Update echo statement in copilot setup to reflect 'Weaver branch'
lm-sousa e3061cd
Fix multi-weaver compilation after rebase onto main
lm-sousa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| name: "Copilot Setup Steps" | ||
|
|
||
| # Automatically run the setup steps when they are changed | ||
| # Allows for streamlined validation, | ||
| # and allow manual testing through the repository's "Actions" tab | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| paths: | ||
| - .github/workflows/copilot-setup-steps.yml | ||
| pull_request: | ||
| paths: | ||
| - .github/workflows/copilot-setup-steps.yml | ||
|
|
||
| env: | ||
| BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
|
|
||
| jobs: | ||
| # The job MUST be called `copilot-setup-steps` | ||
| # otherwise it will not be picked up by Copilot. | ||
| copilot-setup-steps: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| # Permissions set just for the setup steps | ||
| # Copilot has permissions to its branch | ||
|
|
||
| permissions: | ||
| # To allow us to clone the repo for setup | ||
| contents: read | ||
|
|
||
| # The setup steps - install our dependencies | ||
| steps: | ||
| - name: Setup Java | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '21' | ||
|
|
||
| - name: Setup Gradle | ||
| uses: gradle/actions/setup-gradle@v4 | ||
Check failureCode scanning / SonarCloud External GitHub Actions and workflows should be pinned to a commit hash
<!--SONAR_ISSUE_KEY:AaB9HkWP0BnvJIqqvTNF-->Use full commit SHA hash for this dependency. <p>See more on <a href="https://sonarcloud.io/project/issues?id=specs-feup_metafor&issues=AaB9HkWP0BnvJIqqvTNF&open=AaB9HkWP0BnvJIqqvTNF&pullRequest=8">SonarQube Cloud</a></p>
Check failure on line 41 in .github/workflows/copilot-setup-steps.yml
|
||
| with: | ||
| gradle-version: current | ||
|
|
||
| - name: Checkout Metafor | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| path: metafor | ||
|
|
||
| - name: Determine repository refs | ||
| id: repo-refs | ||
| shell: bash | ||
| env: | ||
| BRANCH_NAME: ${{ env.BRANCH_NAME }} | ||
| BASE_BRANCH: ${{ github.base_ref }} | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| # For each dependency repository, determine which branch to checkout. | ||
| # Priority order: | ||
| # 1. A branch with the same name as the current branch | ||
| # 2. If this is a PR, the target branch (base_ref) | ||
| # 3. The default branch of the repository | ||
|
|
||
| determine_ref() { | ||
| local prefix=$1 | ||
| local repo=$2 | ||
| local url="https://github.com/${repo}.git" | ||
|
|
||
| # Get the default branch | ||
| local default_branch | ||
| default_branch=$(git ls-remote --symref "$url" HEAD | awk '/^ref:/ {print $2}' | sed 's@refs/heads/@@') | ||
| echo "${prefix}_default=${default_branch}" >> "$GITHUB_OUTPUT" | ||
| echo "Default branch for ${repo} is '${default_branch}'" | ||
|
|
||
| local ref_to_use="" | ||
|
|
||
| # Priority 1: Same branch name | ||
| if [ -n "$(git ls-remote --heads "$url" "refs/heads/${BRANCH_NAME}")" ]; then | ||
| ref_to_use="${BRANCH_NAME}" | ||
| echo "Using matching branch '${BRANCH_NAME}' in ${repo}" | ||
| # Priority 2: PR target branch (if this is a PR) | ||
| elif [ -n "${BASE_BRANCH}" ] && [ -n "$(git ls-remote --heads "$url" "refs/heads/${BASE_BRANCH}")" ]; then | ||
| ref_to_use="${BASE_BRANCH}" | ||
| echo "Using PR target branch '${BASE_BRANCH}' in ${repo}" | ||
| # Priority 3: Default branch | ||
| else | ||
| ref_to_use="${default_branch}" | ||
| echo "Using default branch '${default_branch}' for ${repo}" | ||
| fi | ||
|
|
||
| echo "${prefix}_ref=${ref_to_use}" >> "$GITHUB_OUTPUT" | ||
| } | ||
|
|
||
| determine_ref "lara" "specs-feup/lara-framework" | ||
| determine_ref "specs" "specs-feup/specs-java-libs" | ||
|
|
||
| - name: Echo checks | ||
| run: | | ||
| echo "Weaver branch: ${{ env.BRANCH_NAME }}" | ||
| echo "PR target branch (if any): ${{ github.base_ref }}" | ||
| echo "Lara framework ref: ${{ steps.repo-refs.outputs.lara_ref }}" | ||
| echo "Lara framework default: ${{ steps.repo-refs.outputs.lara_default }}" | ||
| echo "Specs-java-libs ref: ${{ steps.repo-refs.outputs.specs_ref }}" | ||
| echo "Specs-java-libs default: ${{ steps.repo-refs.outputs.specs_default }}" | ||
|
|
||
| - name: Checkout lara-framework | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| repository: specs-feup/lara-framework | ||
| path: lara-framework | ||
| ref: ${{ steps.repo-refs.outputs.lara_ref }} | ||
|
|
||
| - name: Checkout specs-java-libs | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| repository: specs-feup/specs-java-libs | ||
| path: specs-java-libs | ||
| ref: ${{ steps.repo-refs.outputs.specs_ref }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.