Skip to content

Commit 7c51da1

Browse files
authored
Merge pull request #525 from antmicro/umarcor/set-output
ci/scripts/generate_job_matrix: 'set-output' is deprecated
2 parents 9044f07 + ba6fd22 commit 7c51da1

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.github/scripts/generate_job_matrix.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@
1717
#
1818
# SPDX-License-Identifier: Apache-2.0
1919

20+
from os import environ
21+
from sys import argv as sys_argv, exit as sys_exit
2022
from fpgaperf import get_combinations, get_projects, get_project, toolchains
21-
import sys
2223

23-
if len(sys.argv) < 2:
24-
print("Usage {} <tool>".format(sys.argv[0]))
25-
sys.exit(1)
24+
if len(sys_argv) < 2:
25+
print("Usage {} <tool>".format(sys_argv[0]))
26+
sys_exit(1)
2627

27-
tools = sys.argv[1:]
28+
tools = sys_argv[1:]
2829

2930
all_toolchains = "all" in tools
3031

@@ -54,4 +55,6 @@
5455
)
5556

5657
matrices = {tool.replace('-', '_'): content for tool, content in jobs.items()}
57-
print(f"::set-output name=matrices::{matrices}")
58+
59+
with open(environ['GITHUB_OUTPUT'], 'a', encoding='utf-8') as gho:
60+
gho.write(f"matrices={matrices!s}\n")

.github/workflows/Suite.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ jobs:
3434
run: |
3535
sudo apt update
3636
sudo apt install -y curl wget
37-
export LINK=$(curl -s https://api.github.com/repos/Xilinx/RapidWright/releases/latest | grep "browser_download_url.*_jars.zip" | cut -d : -f 2,3 | tr -d \" | tr -d " ")
38-
echo ::set-output name=link::$LINK
37+
echo "link=$(curl -s https://api.github.com/repos/Xilinx/RapidWright/releases/latest | grep "browser_download_url.*_jars.zip" | cut -d : -f 2,3 | tr -d \" | tr -d " ")" >> $GITHUB_OUTPUT
3938
4039
- name: Generate Matrix
4140
id: generate

0 commit comments

Comments
 (0)