Skip to content

Commit 69922e0

Browse files
authored
Added nightly build time to downloads (#9130)
1 parent 5e20905 commit 69922e0

File tree

3 files changed

+75
-6
lines changed

3 files changed

+75
-6
lines changed

Docs/download.md

Lines changed: 73 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
1-
# Download
1+
# Downloads
22

33
### Latest Release
44

5+
The latest release of CARLA is **0.9.15**, check out the [release announcement](https://carla.org/2023/11/10/release-0.9.15/) for more details.
6+
57
- [CARLA 0.9.15](https://github.com/carla-simulator/carla/releases/tag/0.9.15/) - [Documentation](https://carla.readthedocs.io/en/0.9.15/)
68

79
### Nightly build
810

9-
> This is an automated build with the latest changes pushed to our `dev`
10-
> branch. It contains the very latest fixes and features that will be part of the
11-
> next release, but also some experimental changes. Use at your own risk!
11+
This is an automated build with the latest changes pushed to our `ue4-dev`
12+
branch. It contains the very latest fixes and features that will be part of the
13+
next release, but also some experimental changes. Use at your own risk!
1214

1315
- [CARLA Nightly Build (Linux)](https://carla-releases.s3.us-east-005.backblazeb2.com/Linux/Dev/CARLA_Latest.tar.gz)
1416
- [AdditionalMaps Nightly Build (Linux)](https://carla-releases.s3.us-east-005.backblazeb2.com/Linux/Dev/AdditionalMaps_Latest.tar.gz)
1517
- [CARLA Nightly Build (Windows)](https://carla-releases.s3.us-east-005.backblazeb2.com/Windows/Dev/CARLA_Latest.zip)
1618
- [AdditionalMaps Nightly Build (Windows)](https://carla-releases.s3.us-east-005.backblazeb2.com/Windows/Dev/AdditionalMaps_Latest.zip)
1719

20+
<p><a id="last-run-link" href='https://github.com/carla-simulator/carla/actions'>Last successful build</a>: <span id="last-run-time" class="loading">Loading...</span></p>
21+
1822
### Versions 0.9.x
1923

20-
> Here are the previous versions of CARLA with links to the specific documentation for each version:
24+
Here are the previous versions of CARLA with links to the specific documentation for each version:
2125

2226
- [CARLA 0.9.14](https://github.com/carla-simulator/carla/releases/tag/0.9.14/) - [Documentation](https://carla.readthedocs.io/en/0.9.14/)
2327
- [CARLA 0.9.13](https://github.com/carla-simulator/carla/releases/tag/0.9.13/) - [Documentation](https://carla.readthedocs.io/en/0.9.13/)
@@ -56,3 +60,67 @@ Use tag "latest" for the most recent release:
5660
```sh
5761
docker pull carlasim/carla:latest
5862
```
63+
64+
<script>
65+
async function getLastWorkflowRun(owner, repo, workflowFileName) {
66+
const url = `https://api.github.com/repos/${owner}/${repo}/actions/workflows/${workflowFileName}/runs?status=completed&per_page=1`;
67+
68+
try {
69+
const response = await fetch(url, {
70+
headers: {
71+
'Accept': 'application/vnd.github.v3+json'
72+
}
73+
});
74+
75+
if (!response.ok) {
76+
throw new Error(`HTTP error! status: ${response.status}`);
77+
}
78+
79+
const data = await response.json();
80+
if (data.workflow_runs && data.workflow_runs.length > 0) {
81+
const lastRun = data.workflow_runs[0];
82+
return {
83+
timestamp: lastRun.updated_at,
84+
url: lastRun.html_url,
85+
status: lastRun.conclusion
86+
};
87+
}
88+
return null;
89+
} catch (error) {
90+
console.error('Error fetching workflow runs:', error);
91+
return null;
92+
}
93+
}
94+
95+
// Format timestamp to be more readable
96+
function formatTimestamp(isoString) {
97+
const date = new Date(isoString);
98+
return date.toLocaleString('en-US', {
99+
weekday: 'long',
100+
year: 'numeric',
101+
month: 'long',
102+
day: 'numeric',
103+
hour: '2-digit',
104+
minute: '2-digit',
105+
timeZoneName: 'short'
106+
});
107+
}
108+
109+
// Example usage
110+
getLastWorkflowRun('carla-simulator', 'carla', 'ue4_dev.yml')
111+
.then(result => {
112+
if (result) {
113+
console.log('Last successful run:', result.timestamp);
114+
console.log('View run:', result.url);
115+
const lastRunTimeElement = document.getElementById('last-run-time');
116+
const lastRunLink = document.getElementById('last-run-link')
117+
//const lastRun = result.workflow_runs[0];
118+
const formattedTime = formatTimestamp(result.timestamp);
119+
lastRunTimeElement.textContent = formattedTime;
120+
lastRunLink.setAttribute("href", result.url)
121+
122+
} else {
123+
console.log('No completed runs found');
124+
}
125+
});
126+
</script>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CARLA Simulator
44
[![Documentation](https://readthedocs.org/projects/carla/badge/?version=latest)](http://carla.readthedocs.io)
55

66
[![carla.org](Docs/img/btn/web.png)](http://carla.org)
7-
[![download](Docs/img/btn/download.png)](https://github.com/carla-simulator/carla/blob/master/Docs/download.md)
7+
[![download](Docs/img/btn/download.png)](https://carla.readthedocs.io/en/latest/download/)
88
[![documentation](Docs/img/btn/docs.png)](http://carla.readthedocs.io)
99
[![forum](Docs/img/btn/forum.png)](https://github.com/carla-simulator/carla/discussions)
1010
[![discord](Docs/img/btn/chat.png)](https://discord.gg/8kqACuC)

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ nav:
3434
- 'Blueprint library': 'bp_library.md'
3535
- 'Tutorials': 'tutorials.md'
3636
- 'Extended documentation': 'ext_docs.md'
37+
- 'Downloads': 'download.md'
3738

3839
- CARLA Ecosystem:
3940
- 'ANSYS': 'ecosys_ansys.md'

0 commit comments

Comments
 (0)