forked from pyccel/pyccel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
223 changed files
with
9,192 additions
and
5,747 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -64,6 +64,7 @@ RedBaron | |
intel | ||
nvidia | ||
boolean | ||
booleans | ||
quicksort | ||
iterm | ||
textx | ||
|
This file contains 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,3 @@ | ||
.*code _print_.* | ||
semantic _visit_.* | ||
syntactic _visit_.* |
This file contains 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 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 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,23 @@ | ||
name: "Generate bot token" | ||
inputs: | ||
bot_pem: | ||
description: "The private key which identifies the bot" | ||
required: true | ||
dir: | ||
description: "The directory where the code is found" | ||
required: false | ||
default: "." | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- run: | | ||
pip install jwt requests | ||
shell: bash | ||
- run: | | ||
cd ${{ inputs.dir }} | ||
python -c "from ci_tools.bot_tools.github_api_interactions import get_authorization; t,d=get_authorization(); print('token=',t,sep=''); print('token_exp=',d,sep='')" | ||
shell: bash | ||
id: get_token | ||
env: | ||
PEM: ${{ inputs.bot_pem }} |
This file contains 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,34 @@ | ||
name: 'Posting in progress status' | ||
inputs: | ||
installation_token: | ||
description: "The GitHub API token of the bot" | ||
required: true | ||
run_id: | ||
description: "The id of the check run" | ||
required: true | ||
status: | ||
description: "The final status of the workflow" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "Collecting status" | ||
run: | | ||
import os | ||
import json | ||
import requests | ||
if os.path.exists('test_json_result.json'): | ||
with open('test_json_result.json', 'r') as f: | ||
result = json.load(f) | ||
else: | ||
result = {} | ||
result["status"] = "completed" | ||
result["conclusion"] = "${{ inputs.status }}" | ||
headers = {"Accept": "application/vnd.github+json", "Authorization": "Bearer ${{ inputs.installation_token }}", "X-GitHub-Api-Version": "2022-11-28"} | ||
reply = requests.patch("https://api.github.com/repos/${{ github.repository }}/check-runs/${{ inputs.run_id }}", headers=headers, json=result) | ||
print(reply.text) | ||
shell: python |
This file contains 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,39 @@ | ||
name: 'Posting in progress status' | ||
inputs: | ||
ref: | ||
description: "The ref to post the status to" | ||
required: true | ||
installation_token: | ||
description: "The GitHub API token of the bot" | ||
required: true | ||
name: | ||
description: "The name of the workflow" | ||
required: true | ||
outputs: | ||
check_id: | ||
description: "The ID of the check run" | ||
value: ${{ steps.post.outputs.check_id }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "Posting" | ||
run: | | ||
import requests | ||
headers = {"Accept": "application/vnd.github+json", "Authorization": "Bearer ${{ inputs.installation_token }}", "X-GitHub-Api-Version": "2022-11-28"} | ||
data = {"name":"${{ inputs.name }}", | ||
"head_sha":"${{ inputs.ref }}", | ||
"status":"in_progress", | ||
"details_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"} | ||
reply = requests.post("https://api.github.com/repos/${{ github.repository }}/check-runs", headers=headers, json=data) | ||
print(reply.text) | ||
print(reply.json()) | ||
id = reply.json()["id"] | ||
with open("${{ github.output }}", 'a') as f: | ||
print("check_id=", id, sep='', file=f) | ||
shell: python | ||
id: post |
This file contains 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.