Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
sgliner-ledger committed Aug 31, 2023
1 parent b4ffdb6 commit 8c71c9a
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 332 deletions.
31 changes: 2 additions & 29 deletions .github/workflows/_build_devices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,6 @@ on:
required: false
default: true

pull_request:
push:
inputs:
sdk_ref:
type: string
required: false
default: 'master'

run_nanos:
type: boolean
required: false
default: true
run_nanosp:
type: boolean
required: false
default: true
run_nanox:
type: boolean
required: false
default: true
run_stax:
type: boolean
required: false
default: true



jobs:
build-build:
name: Build for all targets
Expand All @@ -70,7 +43,7 @@ jobs:
- name: Launch build nanos
if: ${{ inputs.run_nanos }}
run: |
python3 scripts/build_and_test/main.py --sdk_ref ${{ inputs.sdk_ref}} --input_file input_files/test_input.json --build --nanos --skip_setup --output_file build_input.json
python3 scripts/build_and_test/main.py --sdk_ref ${{ inputs.sdk_ref}} --input_file input_files/test_input.json --build --nanos --skip_setup --output_file build_nanos.json
- name: Launch build nanosp
if: ${{ inputs.run_nanosp }}
Expand All @@ -89,7 +62,7 @@ jobs:
- name: Merge output files
run: |
python3 scripts/output_scripts/merge.py --input_files build_nanos.json build_nanosp.json build_nanox.json build_stax.json --output_file build_output.json --merge_key "name"
python3 scripts/output_scripts/merge.py --input_pattern "build_*.json" --output_file build_output.json --merge_key "name"
#- name: Push info to DB
# run: |
Expand Down
38 changes: 4 additions & 34 deletions .github/workflows/_test_devices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,36 +29,6 @@ on:
type: boolean
required: false
default: true

pull_request:
push:
inputs:
sdk_ref_nanosp:
type: string
required: false
default: 'API_LEVEL_1'
run_nanosp:
type: boolean
required: false
default: true

sdk_ref_nanox:
type: string
required: false
default: 'API_LEVEL_5'
run_nanox:
type: boolean
required: false
default: true

sdk_ref_stax:
type: string
required: false
default: 'API_LEVEL_12'
run_stax:
type: boolean
required: false
default: true

jobs:
test:
Expand All @@ -78,21 +48,21 @@ jobs:
- name: Launch test nanosp
if: ${{ inputs.run_nanosp }}
run: |
python3 scripts/build_and_test/main.py --sdk_ref ${{ inputs.sdk_ref_nanosp }} --input_file input_files/test.json --test --nanosp --skip_setup --output_file test_nanosp.json
python3 scripts/build_and_test/main.py --sdk_ref ${{ inputs.sdk_ref_nanosp }} --input_file input_files/test_input.json --test --nanosp --skip_setup --output_file test_nanosp.json
- name: Launch test nanox
if: ${{ inputs.run_nanox }}
run: |
python3 scripts/build_and_test/main.py --sdk_ref ${{ inputs.sdk_ref_nanox }} --input_file input_files/test.json --test --nanox --skip_setup --output_file test_nanox.json
python3 scripts/build_and_test/main.py --sdk_ref ${{ inputs.sdk_ref_nanox }} --input_file input_files/test_input.json --test --nanox --skip_setup --output_file test_nanox.json
- name: Launch test stax
if: ${{ inputs.run_stax }}
run: |
python3 scripts/build_and_test/main.py --sdk_ref ${{ inputs.sdk_ref_stax }} --input_file input_files/test.json --test --stax --skip_setup --output_file test_stax.json
python3 scripts/build_and_test/main.py --sdk_ref ${{ inputs.sdk_ref_stax }} --input_file input_files/test_input.json --test --stax --skip_setup --output_file test_stax.json
- name: Merge output files
run: |
python3 scripts/output_scripts/merge.py --input_files test_nanosp.json test_nanox.json test_stax.json --output_file test_output.json --merge_key "name"
python3 scripts/output_scripts/merge.py --input_pattern "test_*.json" --output_file test_output.json --merge_key "name"
- name: Archive output file
uses: actions/upload-artifact@v3
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/check_outdated_build_db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Check outdated build db

on:
workflow_dispatch:
#push:

jobs:
compare_files:
Expand Down
221 changes: 0 additions & 221 deletions input_files/test_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,226 +16,5 @@
"variants_nanosp": [
"ACA"
]
},
{
"name": "app-aergo",
"owner": "aergoio",
"ref": "develop",
"url": "https://github.com/LedgerHQ/app-aergo",
"build_path": "workdir/app-near",
"test_dir": "tests/functional",
"extra_flags": "TESTING=1 POPULATE=1"
},
{
"name": "app-aeternity",
"owner": "LedgerHQ",
"ref": "master",
"url": "https://github.com/LedgerHQ/app-aeternity",
"variant_param": "COIN",
"variants_nanos": [
"aeternity"
],
"variants_nanox": [
"aeternity"
],
"variants_nanosp": [
"aeternity"
],
"variants_stax": [
"aeternity"
]
},
{
"name": "app-age",
"owner": "LedgerHQ",
"ref": "main",
"url": "https://github.com/LedgerHQ/app-age"
},
{
"name": "app-aion",
"owner": "aionnetwork",
"ref": "master",
"url": "https://github.com/LedgerHQ/app-aion",
"variant_param": "CHAIN",
"variants_nanos": [
"aion"
],
"variants_nanox": [
"aion"
],
"variants_nanosp": [
"aion"
],
"variants_stax": [
"aion"
]
},
{
"name": "app-alephzero",
"owner": "Zondax",
"ref": "develop",
"url": "https://github.com/LedgerHQ/app-alephzero",
"build_path": "app",
"variant_param": "COIN",
"variants_nanos": [
"AZERO",
"AZERO_XL"
],
"variants_nanox": [
"AZERO"
],
"variants_nanosp": [
"AZERO"
],
"variants_stax": [
"AZERO"
]
},
{
"name": "app-algorand",
"owner": "algorand",
"ref": "develop",
"url": "https://github.com/LedgerHQ/app-algorand",
"build_path": "app",
"variant_param": "COIN",
"variants_nanos": [
"ALGO"
],
"variants_nanox": [
"ALGO"
],
"variants_nanosp": [
"ALGO"
],
"variants_stax": [
"ALGO"
]
},
{
"name": "app-aptos",
"owner": "pontem-network",
"ref": "develop",
"url": "https://github.com/LedgerHQ/app-aptos",
"variant_param": "COIN",
"variants_nanos": [
"APTOS"
],
"variants_nanox": [
"APTOS"
],
"variants_nanosp": [
"APTOS"
],
"variants_stax": [
"APTOS"
]
},
{
"name": "app-ardor",
"owner": "jelurida-dev",
"ref": "develop",
"url": "https://github.com/LedgerHQ/app-ardor",
"variant_param": "COIN",
"variants_nanos": [
"ardor"
],
"variants_nanox": [
"ardor"
],
"variants_nanosp": [
"ardor"
],
"variants_stax": [
"ardor"
]
},
{
"name": "app-ark",
"owner": "ArkEcosystem",
"ref": "master",
"url": "https://github.com/LedgerHQ/app-ark",
"variant_param": "COIN",
"variants_nanos": [
"ark"
],
"variants_nanox": [
"ark"
],
"variants_nanosp": [
"ark"
],
"variants_stax": [
"ark"
]
},
{
"name": "app-arweave",
"owner": "Zondax",
"ref": "develop",
"url": "https://github.com/LedgerHQ/app-arweave",
"build_path": "app",
"variant_param": "COIN",
"variants_nanos": [
"ARWEAVE"
],
"variants_nanox": [
"ARWEAVE"
],
"variants_nanosp": [
"ARWEAVE"
],
"variants_stax": [
"ARWEAVE"
]
},
{
"name": "app-astar",
"owner": "Zondax",
"ref": "develop",
"url": "https://github.com/LedgerHQ/app-astar",
"build_path": "app",
"variant_param": "COIN",
"variants_nanos": [
"ASTR",
"ASTR_XL"
],
"variants_nanox": [
"ASTR"
],
"variants_nanosp": [
"ASTR"
],
"variants_stax": [
"ASTR"
]
},
{
"name": "app-avalanche",
"owner": "ava-labs",
"ref": "develop",
"url": "https://github.com/LedgerHQ/app-avalanche",
"build_blacklist": [
"nanos",
"nanosp",
"nanox",
"stax"
],
"test_blacklist": [
"nanos",
"nanosp",
"nanox",
"stax"
],
"build_path": "app",
"variant_param": "COIN",
"variants_nanos": [
"AVAX"
],
"variants_nanox": [
"AVAX"
],
"variants_nanosp": [
"AVAX"
]
}
]
15 changes: 8 additions & 7 deletions scripts/build_and_test/build_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ def build_all_devices(devices: Devices, sdk_path: Path, app_json: dict, workdir:
app_build_path = workdir / Path(app_json.get("name") + "/" + app_json.get("build_path", "."))
blacklist = app_json.get("build_blacklist", "[]")

output = {}
output[repo_name] = {}
output[repo_name]["build"] = {}
output = {
"name": repo_name,
}
output["build"] = {}

if "nanos" in blacklist:
nanos_output = "Skipped"
Expand All @@ -74,12 +75,12 @@ def build_all_devices(devices: Devices, sdk_path: Path, app_json: dict, workdir:
stax_output = build_device(devices.stax, variant_param, app_build_path, sdk_path, app_json)

if nanos_output:
output[repo_name]["build"]["nanos"] = nanos_output
output["build"]["nanos"] = nanos_output
if nanosp_output:
output[repo_name]["build"]["nanosp"] = nanosp_output
output["build"]["nanosp"] = nanosp_output
if nanox_output:
output[repo_name]["build"]["nanox"] = nanox_output
output["build"]["nanox"] = nanox_output
if stax_output:
output[repo_name]["build"]["stax"] = stax_output
output["build"]["stax"] = stax_output

return output
Loading

0 comments on commit 8c71c9a

Please sign in to comment.