Skip to content

Commit 6f327ff

Browse files
Merge pull request #2 from microchip-ung/2024.12-soak-github-release-new
2024.12 Release
2 parents d3f9a1a + ca9440b commit 6f327ff

File tree

100 files changed

+7428
-3438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+7428
-3438
lines changed

.cmake/aggr-artifacts.rb

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
#!/usr/bin/env ruby
2+
3+
# Copyright (c) 2004-2020 Microchip Technology Inc. and its subsidiaries.
4+
# SPDX-License-Identifier: MIT
5+
6+
require 'pp'
7+
require 'open3'
8+
require 'optparse'
9+
10+
$res = 0
11+
$verbose = true
12+
13+
def run cmd
14+
if $verbose
15+
STDOUT.print "RUN: #{cmd}"
16+
STDOUT.flush
17+
end
18+
19+
a = Time.now
20+
o, e, s = Open3.capture3(cmd)
21+
b = Time.now
22+
23+
if $verbose
24+
STDOUT.print " -> #{s} in %1.3fs\n" % [b - a]
25+
STDOUT.flush
26+
end
27+
28+
if s.to_i != 0 or e.size > 0
29+
raise "CMD: #{cmd} status: #{s.to_i}, std-err: #{e}"
30+
end
31+
32+
return o, e, s
33+
end
34+
35+
def sys cmd
36+
if $verbose
37+
puts "RUN: #{cmd}"
38+
end
39+
40+
a = Time.now
41+
system cmd
42+
b = Time.now
43+
44+
if $verbose
45+
puts "RUN-Done: #{cmd} -> #{$?} in %1.3fs\n" % [b - a]
46+
STDOUT.flush
47+
end
48+
49+
if $?.to_i != 0
50+
raise "CMD: #{cmd} status: #{$?.to_i}"
51+
end
52+
end
53+
54+
def try cmd
55+
begin
56+
run cmd
57+
rescue
58+
puts "CMD: #{cmd} failed (but will continue)"
59+
$res = 1
60+
end
61+
end
62+
63+
def cd path
64+
puts "cd #{path} (was: #{Dir.pwd})" if $verbose
65+
Dir.chdir(path)
66+
end
67+
68+
$top = File.dirname(File.dirname(File.expand_path(__FILE__)))
69+
cd $top
70+
71+
git_sha = %x(git rev-parse --short HEAD).chop
72+
git_sha_long = %x(git rev-parse HEAD).chop
73+
begin
74+
git_id = %x(git describe --tags --long).chop
75+
rescue
76+
git_id = git_sha
77+
end
78+
if ENV['BRANCH_NAME']
79+
git_branch = ENV['BRANCH_NAME']
80+
else
81+
git_branch = %x(git symbolic-ref --short -q HEAD).chop
82+
end
83+
84+
out_name = "mepa-#{git_id}@#{git_branch}"
85+
86+
raise "No ws folder" if not File.exist? "./ws"
87+
88+
if File.exist? "#{out_name}"
89+
run "rm -rf #{out_name}"
90+
end
91+
sys "cp -r ws #{out_name}"
92+
sys "mkdir #{out_name}/bin"
93+
sys "tar -C #{out_name}/bin -f arm64.tar -x"
94+
run "tar -czvf #{out_name}.tar.gz #{out_name}"
95+
96+
if File.exist? "./images"
97+
sys "cp #{out_name}/bin/arm64/mepa_demo/*.itb images/."
98+
end
99+
100+
run "rm -rf #{out_name}"
101+
102+
cmd = [".cmake/artifactory-ci-upload"]
103+
cmd << "-vvv"
104+
cmd << "--dep-file .cmake/deps-bsp.json"
105+
cmd << "--dep-file .cmake/deps-docker.json"
106+
cmd << "--dep-file .cmake/deps-toolchain.json"
107+
cmd << "#{out_name}.tar.gz"
108+
sys cmd.join(" ")
109+
110+
run "cp #{out_name}.tar.gz images/." if File.exist? "./images"
111+
112+
exit $res
113+

0 commit comments

Comments
 (0)