Skip to content

Commit cf4af96

Browse files
committed
actions: vendor sources with submodules for releases
1 parent 61ed9b6 commit cf4af96

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

.github/workflows/source-vendor.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Create source archive with vendored dependencies
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
vendor-sources:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout repository with submodules
10+
uses: actions/checkout@v4
11+
with:
12+
submodules: 'recursive'
13+
14+
- name: Create clean tarball
15+
run: |
16+
git archive --format=tar HEAD -o yosys-src-vendored.tar
17+
git submodule foreach '
18+
git archive --format=tar --prefix="${sm_path}/" HEAD --output=${toplevel}/vendor-${name}.tar
19+
'
20+
tar --concatenate --file=yosys-src-vendored.tar vendor-*.tar
21+
# 2008 bug https://lists.gnu.org/archive/html/bug-tar/2008-08/msg00002.html
22+
for file in vendor-*.tar; do
23+
tar --concatenate --file=yosys-src-vendored.tar "$file"
24+
done
25+
26+
gzip yosys-src-vendored.tar
27+
28+
- name: Store tarball artifact
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: vendored-sources
32+
path: yosys-src-vendored.tar.gz
33+
retention-days: 1

.gitmodules

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[submodule "abc"]
22
path = abc
33
url = https://github.com/YosysHQ/abc
4-
[submodule "libs/cxxopts"]
4+
# Don't use paths as names to avoid git archive problems
5+
[submodule "cxxopts"]
56
path = libs/cxxopts
67
url = https://github.com/jarro2783/cxxopts

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ Yosys is free software licensed under the ISC license (a GPL
3333
compatible license that is similar in terms to the MIT license
3434
or the 2-clause BSD license).
3535

36+
Third-party software distributed alongside this software
37+
is licensed under compatible licenses.
38+
Please refer to `abc` and `libs` subdirectories for their license terms.
3639

3740
Web Site and Other Resources
3841
============================

0 commit comments

Comments
 (0)