From b54a726f6e9da83da27c13da699004e8d59ad8af Mon Sep 17 00:00:00 2001 From: Isaac Torres Date: Wed, 27 Sep 2023 21:55:34 -0700 Subject: [PATCH 01/14] test upload --- .github/workflows/bullseye-aarch64-sysroot.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/bullseye-aarch64-sysroot.yaml b/.github/workflows/bullseye-aarch64-sysroot.yaml index 844cc37..99be261 100644 --- a/.github/workflows/bullseye-aarch64-sysroot.yaml +++ b/.github/workflows/bullseye-aarch64-sysroot.yaml @@ -21,6 +21,12 @@ jobs: run: ./sysroot/sysroot-creator.sh build arm64 - name: Upload sysroot + uses: actions/upload-artifacts@v3 + with: + name: debian_bullseye_aarch64_sysroot.tar.xz + path: sysroot/out/sysroot-build/bullseye/debian_bullseye_arm64_sysroot.tar.xz + + - name: Release sysroot if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') uses: svenstaro/upload-release-action@v1-release with: From fbcac245f802b068c3b9daf15f79c56af5b3a201 Mon Sep 17 00:00:00 2001 From: Isaac Torres Date: Wed, 27 Sep 2023 21:56:49 -0700 Subject: [PATCH 02/14] fix --- .github/workflows/bullseye-aarch64-sysroot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bullseye-aarch64-sysroot.yaml b/.github/workflows/bullseye-aarch64-sysroot.yaml index 99be261..5b57a5c 100644 --- a/.github/workflows/bullseye-aarch64-sysroot.yaml +++ b/.github/workflows/bullseye-aarch64-sysroot.yaml @@ -21,7 +21,7 @@ jobs: run: ./sysroot/sysroot-creator.sh build arm64 - name: Upload sysroot - uses: actions/upload-artifacts@v3 + uses: actions/upload-artifact@v3 with: name: debian_bullseye_aarch64_sysroot.tar.xz path: sysroot/out/sysroot-build/bullseye/debian_bullseye_arm64_sysroot.tar.xz From 0dbcfbf7d6c90c91e73b7d990f021e541f1bb610 Mon Sep 17 00:00:00 2001 From: Isaac Torres Date: Wed, 27 Sep 2023 22:15:56 -0700 Subject: [PATCH 03/14] add amd --- .github/workflows/bullseye-x86_64-sysroot.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/bullseye-x86_64-sysroot.yaml b/.github/workflows/bullseye-x86_64-sysroot.yaml index 1799b45..0b72185 100644 --- a/.github/workflows/bullseye-x86_64-sysroot.yaml +++ b/.github/workflows/bullseye-x86_64-sysroot.yaml @@ -21,6 +21,13 @@ jobs: run: ./sysroot/sysroot-creator.sh build amd64 - name: Upload sysroot + uses: actions/upload-artifact@v3 + with: + name: debian_bullseye_x86_64_sysroot.tar.xz + path: sysroot/out/sysroot-build/bullseye/debian_bullseye_amd64_sysroot.tar.xz + + + - name: Release sysroot if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') uses: svenstaro/upload-release-action@v1-release with: From 837f42e434206488797ef74fd3fdfb6d51da10d5 Mon Sep 17 00:00:00 2001 From: Isaac Torres Date: Thu, 28 Sep 2023 17:23:00 -0700 Subject: [PATCH 04/14] add test suite --- .bazelrc | 4 ++ .../workflows/bullseye-aarch64-sysroot.yaml | 14 +++++++ .gitignore | 2 + BUILD.bazel | 0 WORKSPACE.bazel | 42 +++++++++++++++++++ sysroot/BUILD.bazel | 5 +++ sysroot/test/uuid.cc | 5 +++ 7 files changed, 72 insertions(+) create mode 100644 .bazelrc create mode 100644 BUILD.bazel create mode 100644 WORKSPACE.bazel create mode 100644 sysroot/BUILD.bazel create mode 100644 sysroot/test/uuid.cc diff --git a/.bazelrc b/.bazelrc new file mode 100644 index 0000000..a74da6c --- /dev/null +++ b/.bazelrc @@ -0,0 +1,4 @@ +build:aarch64_sysroot --incompatible_enable_cc_toolchain_resolution +build:aarch64_sysroot --platforms=@rules_swiftnav//platforms:aarch64_bullseye_graviton2 + +try-import %workspace%/.bazelrc.user diff --git a/.github/workflows/bullseye-aarch64-sysroot.yaml b/.github/workflows/bullseye-aarch64-sysroot.yaml index 5b57a5c..f07c534 100644 --- a/.github/workflows/bullseye-aarch64-sysroot.yaml +++ b/.github/workflows/bullseye-aarch64-sysroot.yaml @@ -20,6 +20,20 @@ jobs: - name: Create sysroot run: ./sysroot/sysroot-creator.sh build arm64 + - uses: bazelbuild/setup-bazelisk@v2 + + - name: Mount bazel cache + uses: actions/cache@v1 + with: + path: "~/.cache/bazel" + key: bazel + + - name: Copy sysroot + run: cp sysroot/out/sysroot-build/bullseye/debian_bullseye_arm64_sysroot.tar.xz debian_bullseye_aarch64_sysroot.tar.xz + + - name: Test sysroot + run: bazel build --config=aarch64_sysroot //sysroot:uuid + - name: Upload sysroot uses: actions/upload-artifact@v3 with: diff --git a/.gitignore b/.gitignore index c2954e1..b024de7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ build-x86/ output/ llvm-obfuscator-*.txz sysroot/out +/bazel-* +.bazelrc.user diff --git a/BUILD.bazel b/BUILD.bazel new file mode 100644 index 0000000..e69de29 diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel new file mode 100644 index 0000000..ec1a386 --- /dev/null +++ b/WORKSPACE.bazel @@ -0,0 +1,42 @@ +workspace(name = "swift-toolchains") + +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +http_archive( + name = "bazel_skylib", + sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz", + ], +) + +load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") + +bazel_skylib_workspace() + +http_archive( + name = "rules_swiftnav", + strip_prefix = "rules_swiftnav-643e16de3cecb491955472d6b19b3672a0aaac9e", + url = "https://github.com/swift-nav/rules_swiftnav/archive/643e16de3cecb491955472d6b19b3672a0aaac9e.tar.gz", +) + +load("@rules_swiftnav//cc:repositories.bzl", "register_swift_cc_toolchains", "swift_cc_toolchain") + +swift_cc_toolchain() + +register_swift_cc_toolchains() + +load("@rules_swiftnav//tools:local_archive.bzl", "local_archive") + +local_archive( + name = "aarch64-sysroot", + build_file_content = """ +filegroup( + name = "aarch64-sysroot", + srcs = glob(["*/**"]), + visibility = ["//visibility:public"], +) + """, + src = "//:debian_bullseye_aarch64_sysroot.tar.xz", +) diff --git a/sysroot/BUILD.bazel b/sysroot/BUILD.bazel new file mode 100644 index 0000000..707793e --- /dev/null +++ b/sysroot/BUILD.bazel @@ -0,0 +1,5 @@ +cc_binary( + name = "uuid", + srcs = ["test/uuid.cc"], + tags = ["manual"], +) diff --git a/sysroot/test/uuid.cc b/sysroot/test/uuid.cc new file mode 100644 index 0000000..0dec64e --- /dev/null +++ b/sysroot/test/uuid.cc @@ -0,0 +1,5 @@ +#include + +int main() { + uuid_t uuid{}; +} From cbeac9434a007239de3fd29bbd6120a0aa31ac3c Mon Sep 17 00:00:00 2001 From: Isaac Torres Date: Thu, 28 Sep 2023 17:25:40 -0700 Subject: [PATCH 05/14] sha --- WORKSPACE.bazel | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index ec1a386..8c4a87d 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -17,8 +17,8 @@ bazel_skylib_workspace() http_archive( name = "rules_swiftnav", - strip_prefix = "rules_swiftnav-643e16de3cecb491955472d6b19b3672a0aaac9e", - url = "https://github.com/swift-nav/rules_swiftnav/archive/643e16de3cecb491955472d6b19b3672a0aaac9e.tar.gz", + strip_prefix = "rules_swiftnav-a3e5c82504c07b8de9a2c8c455a99ebc864d5859", + url = "https://github.com/swift-nav/rules_swiftnav/archive/a3e5c82504c07b8de9a2c8c455a99ebc864d5859.tar.gz", ) load("@rules_swiftnav//cc:repositories.bzl", "register_swift_cc_toolchains", "swift_cc_toolchain") From 135829248f91f8e1aad8385858d904de33b0c889 Mon Sep 17 00:00:00 2001 From: Isaac Torres Date: Thu, 28 Sep 2023 17:33:57 -0700 Subject: [PATCH 06/14] add lapack test --- sysroot/test/lapack.cc | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sysroot/test/lapack.cc diff --git a/sysroot/test/lapack.cc b/sysroot/test/lapack.cc new file mode 100644 index 0000000..4e8f99d --- /dev/null +++ b/sysroot/test/lapack.cc @@ -0,0 +1,42 @@ +// LAPACK test code +//compile with: g++ main.cpp -llapack -lblas -o testprog + +#include +#include + +using namespace std; + +extern "C" void dgetrf_(int* dim1, int* dim2, double* a, int* lda, int* ipiv, int* info); +extern "C" void dgetrs_(char *TRANS, int *N, int *NRHS, double *A, int *LDA, int *IPIV, double *B, int *LDB, int *INFO ); + +int main() +{ + char trans = 'N'; + int dim = 2; + int nrhs = 1; + int LDA = dim; + int LDB = dim; + int info; + + vector a, b; + + a.push_back(1); + a.push_back(1); + a.push_back(1); + a.push_back(-1); + + b.push_back(2); + b.push_back(0); + + int ipiv[3]; + + dgetrf_(&dim, &dim, &*a.begin(), &LDA, ipiv, &info); + dgetrs_(&trans, &dim, &nrhs, & *a.begin(), &LDA, ipiv, & *b.begin(), &LDB, &info); + + + std::cout << "solution is:"; + std::cout << "[" << b[0] << ", " << b[1] << ", " << "]" << std::endl; + std::cout << "Info = " << info << std::endl; + + return(0); +} From d382021ec6ea4720c0cca9faa08dbc13165bddff Mon Sep 17 00:00:00 2001 From: Isaac Torres Date: Thu, 28 Sep 2023 17:36:59 -0700 Subject: [PATCH 07/14] add lapack test --- sysroot/BUILD.bazel | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sysroot/BUILD.bazel b/sysroot/BUILD.bazel index 707793e..1fc4885 100644 --- a/sysroot/BUILD.bazel +++ b/sysroot/BUILD.bazel @@ -3,3 +3,15 @@ cc_binary( srcs = ["test/uuid.cc"], tags = ["manual"], ) + +cc_binary( + name = "lapack", + srcs = ["test/lapack.cc"], + tags = ["manual"], + linkopts = [ + "-lm", + "-lpthread", + "-lblas", + "-llapack", + ], +) From c156549caeddc8a50af1be2976579ccd350cba63 Mon Sep 17 00:00:00 2001 From: Isaac Torres Date: Thu, 28 Sep 2023 17:39:45 -0700 Subject: [PATCH 08/14] link against uuid --- sysroot/BUILD.bazel | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysroot/BUILD.bazel b/sysroot/BUILD.bazel index 1fc4885..148d78d 100644 --- a/sysroot/BUILD.bazel +++ b/sysroot/BUILD.bazel @@ -2,6 +2,9 @@ cc_binary( name = "uuid", srcs = ["test/uuid.cc"], tags = ["manual"], + linkopts = [ + "-luuid", + ], ) cc_binary( From 1826f963b77f403af0eadac103c75a93236dd4bf Mon Sep 17 00:00:00 2001 From: Isaac Torres Date: Thu, 28 Sep 2023 17:44:19 -0700 Subject: [PATCH 09/14] run all tests --- .github/workflows/bullseye-aarch64-sysroot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bullseye-aarch64-sysroot.yaml b/.github/workflows/bullseye-aarch64-sysroot.yaml index f07c534..8cc441e 100644 --- a/.github/workflows/bullseye-aarch64-sysroot.yaml +++ b/.github/workflows/bullseye-aarch64-sysroot.yaml @@ -32,7 +32,7 @@ jobs: run: cp sysroot/out/sysroot-build/bullseye/debian_bullseye_arm64_sysroot.tar.xz debian_bullseye_aarch64_sysroot.tar.xz - name: Test sysroot - run: bazel build --config=aarch64_sysroot //sysroot:uuid + run: bazel build --config=aarch64_sysroot //sysroot/... - name: Upload sysroot uses: actions/upload-artifact@v3 From ef49597d91fee5a05eee9209cb0baa7e23abd67e Mon Sep 17 00:00:00 2001 From: Isaac Torres Date: Thu, 28 Sep 2023 17:46:09 -0700 Subject: [PATCH 10/14] fix --- sysroot/BUILD.bazel | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysroot/BUILD.bazel b/sysroot/BUILD.bazel index 148d78d..3a0c91d 100644 --- a/sysroot/BUILD.bazel +++ b/sysroot/BUILD.bazel @@ -1,7 +1,6 @@ cc_binary( name = "uuid", srcs = ["test/uuid.cc"], - tags = ["manual"], linkopts = [ "-luuid", ], @@ -10,7 +9,6 @@ cc_binary( cc_binary( name = "lapack", srcs = ["test/lapack.cc"], - tags = ["manual"], linkopts = [ "-lm", "-lpthread", From a9c1cf3611563fbcf1305f0f4c11f8502f22862b Mon Sep 17 00:00:00 2001 From: Isaac Torres Date: Thu, 28 Sep 2023 18:09:02 -0700 Subject: [PATCH 11/14] update gen list --- sysroot/generated_package_lists/bullseye.arm64 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysroot/generated_package_lists/bullseye.arm64 b/sysroot/generated_package_lists/bullseye.arm64 index ebe6feb..5e6152c 100644 --- a/sysroot/generated_package_lists/bullseye.arm64 +++ b/sysroot/generated_package_lists/bullseye.arm64 @@ -4,5 +4,9 @@ https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/gcc-10/l https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/gcc-10/libstdc++6_10.2.1-6_arm64.deb https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/glibc/libc6_2.31-13+deb11u5_arm64.deb https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/glibc/libc6-dev_2.31-13+deb11u5_arm64.deb +https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/libblas3_3.9.0-3_arm64.deb +https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/libblas-dev_3.9.0-3_arm64.deb +https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/liblapack3_3.9.0-3_arm64.deb +https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/liblapack-dev_3.9.0-3_arm64.deb https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/linux/linux-libc-dev_6.1.12-1~bpo11+1_arm64.deb https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/u/util-linux/uuid-dev_2.36.1-8+deb11u1_arm64.deb From b657d83dcd610e897f5dbc78832c7921ebd0020d Mon Sep 17 00:00:00 2001 From: Isaac Torres Date: Thu, 28 Sep 2023 20:12:56 -0700 Subject: [PATCH 12/14] fixes --- .bazeliskrc | 1 + .bazelrc | 3 +++ WORKSPACE.bazel | 12 ++++++++++++ sysroot/BUILD.bazel | 6 +++++- sysroot/generated_package_lists/bullseye.amd64 | 4 ++++ sysroot/sysroot-creator.sh | 4 ++-- sysroot/test/uuid.cc | 3 +++ 7 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 .bazeliskrc diff --git a/.bazeliskrc b/.bazeliskrc new file mode 100644 index 0000000..afe0b46 --- /dev/null +++ b/.bazeliskrc @@ -0,0 +1 @@ +USE_BAZEL_VERSION=6.2.0 diff --git a/.bazelrc b/.bazelrc index a74da6c..10054a9 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,4 +1,7 @@ build:aarch64_sysroot --incompatible_enable_cc_toolchain_resolution build:aarch64_sysroot --platforms=@rules_swiftnav//platforms:aarch64_bullseye_graviton2 +build:x86_64_sysroot --incompatible_enable_cc_toolchain_resolution +build:x86_64_sysroot --@rules_swiftnav//cc:enable_sysroot=true + try-import %workspace%/.bazelrc.user diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index 8c4a87d..77228fd 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -40,3 +40,15 @@ filegroup( """, src = "//:debian_bullseye_aarch64_sysroot.tar.xz", ) + +local_archive( + name = "x86_64-sysroot", + build_file_content = """ +filegroup( + name = "x86_64-sysroot", + srcs = glob(["*/**"]), + visibility = ["//visibility:public"], +) + """, + src = "//:debian_bullseye_x86_64_sysroot.tar.xz", +) diff --git a/sysroot/BUILD.bazel b/sysroot/BUILD.bazel index 3a0c91d..70caeee 100644 --- a/sysroot/BUILD.bazel +++ b/sysroot/BUILD.bazel @@ -7,9 +7,13 @@ cc_binary( ) cc_binary( - name = "lapack", + name = "foo", srcs = ["test/lapack.cc"], linkopts = [ + "-Lexternal/aarch64-sysroot/usr/lib/aarch64-linux-gnu/blas", + "-Lexternal/aarch64-sysroot/usr/lib/aarch64-linux-gnu/lapack", + "-Lexternal/x86_64-sysroot/usr/lib/x86_64-linux-gnu/blas", + "-Lexternal/x86_64-sysroot/usr/lib/x86_64-linux-gnu/lapack", "-lm", "-lpthread", "-lblas", diff --git a/sysroot/generated_package_lists/bullseye.amd64 b/sysroot/generated_package_lists/bullseye.amd64 index 9cbed82..5516b5e 100644 --- a/sysroot/generated_package_lists/bullseye.amd64 +++ b/sysroot/generated_package_lists/bullseye.amd64 @@ -4,5 +4,9 @@ https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/gcc-10/l https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/gcc-10/libstdc++6_10.2.1-6_amd64.deb https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/glibc/libc6_2.31-13+deb11u5_amd64.deb https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/glibc/libc6-dev_2.31-13+deb11u5_amd64.deb +https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/libblas3_3.9.0-3_amd64.deb +https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/libblas-dev_3.9.0-3_amd64.deb +https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/liblapack3_3.9.0-3_amd64.deb +https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/liblapack-dev_3.9.0-3_amd64.deb https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/linux/linux-libc-dev_6.1.12-1~bpo11+1_amd64.deb https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/u/util-linux/uuid-dev_2.36.1-8+deb11u1_amd64.deb diff --git a/sysroot/sysroot-creator.sh b/sysroot/sysroot-creator.sh index 1bd62fe..ad76898 100755 --- a/sysroot/sysroot-creator.sh +++ b/sysroot/sysroot-creator.sh @@ -61,10 +61,10 @@ DEBIAN_PACKAGES="\ uuid-dev libgcc-10-dev libgcc-s1 - libblas3 libblas-dev - liblapack3 + libblas3 liblapack-dev + liblapack3 " DEBIAN_PACKAGES_AMD64=" diff --git a/sysroot/test/uuid.cc b/sysroot/test/uuid.cc index 0dec64e..b94827d 100644 --- a/sysroot/test/uuid.cc +++ b/sysroot/test/uuid.cc @@ -1,5 +1,8 @@ #include +#include int main() { uuid_t uuid{}; + uuid_generate_random(uuid); + std::cout << "uuid: " << uuid << std::endl; } From 58e26ac3aaf4dad366f0e63c3a03a0eee6919a39 Mon Sep 17 00:00:00 2001 From: Isaac Torres Date: Thu, 28 Sep 2023 20:14:20 -0700 Subject: [PATCH 13/14] add x86 --- .github/workflows/bullseye-x86_64-sysroot.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/bullseye-x86_64-sysroot.yaml b/.github/workflows/bullseye-x86_64-sysroot.yaml index 0b72185..37d7f02 100644 --- a/.github/workflows/bullseye-x86_64-sysroot.yaml +++ b/.github/workflows/bullseye-x86_64-sysroot.yaml @@ -20,6 +20,20 @@ jobs: - name: Create sysroot run: ./sysroot/sysroot-creator.sh build amd64 + - uses: bazelbuild/setup-bazelisk@v2 + + - name: Mount bazel cache + uses: actions/cache@v1 + with: + path: "~/.cache/bazel" + key: bazel + + - name: Copy sysroot + run: cp sysroot/out/sysroot-build/bullseye/debian_bullseye_amd64_sysroot.tar.xz debian_bullseye_x86_64_sysroot.tar.xz + + - name: Test sysroot + run: bazel build --config=x86_64_sysroot //sysroot/... + - name: Upload sysroot uses: actions/upload-artifact@v3 with: From c60028acdbd1d6cb1b556b1bb02661f13fd69d07 Mon Sep 17 00:00:00 2001 From: Isaac Torres Date: Thu, 28 Sep 2023 20:34:44 -0700 Subject: [PATCH 14/14] upload before testing --- .github/workflows/bullseye-aarch64-sysroot.yaml | 12 ++++++------ .github/workflows/bullseye-x86_64-sysroot.yaml | 13 ++++++------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/bullseye-aarch64-sysroot.yaml b/.github/workflows/bullseye-aarch64-sysroot.yaml index 8cc441e..2b0ae8b 100644 --- a/.github/workflows/bullseye-aarch64-sysroot.yaml +++ b/.github/workflows/bullseye-aarch64-sysroot.yaml @@ -20,6 +20,12 @@ jobs: - name: Create sysroot run: ./sysroot/sysroot-creator.sh build arm64 + - name: Upload sysroot + uses: actions/upload-artifact@v3 + with: + name: debian_bullseye_aarch64_sysroot.tar.xz + path: sysroot/out/sysroot-build/bullseye/debian_bullseye_arm64_sysroot.tar.xz + - uses: bazelbuild/setup-bazelisk@v2 - name: Mount bazel cache @@ -34,12 +40,6 @@ jobs: - name: Test sysroot run: bazel build --config=aarch64_sysroot //sysroot/... - - name: Upload sysroot - uses: actions/upload-artifact@v3 - with: - name: debian_bullseye_aarch64_sysroot.tar.xz - path: sysroot/out/sysroot-build/bullseye/debian_bullseye_arm64_sysroot.tar.xz - - name: Release sysroot if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') uses: svenstaro/upload-release-action@v1-release diff --git a/.github/workflows/bullseye-x86_64-sysroot.yaml b/.github/workflows/bullseye-x86_64-sysroot.yaml index 37d7f02..71c9831 100644 --- a/.github/workflows/bullseye-x86_64-sysroot.yaml +++ b/.github/workflows/bullseye-x86_64-sysroot.yaml @@ -20,6 +20,12 @@ jobs: - name: Create sysroot run: ./sysroot/sysroot-creator.sh build amd64 + - name: Upload sysroot + uses: actions/upload-artifact@v3 + with: + name: debian_bullseye_x86_64_sysroot.tar.xz + path: sysroot/out/sysroot-build/bullseye/debian_bullseye_amd64_sysroot.tar.xz + - uses: bazelbuild/setup-bazelisk@v2 - name: Mount bazel cache @@ -34,13 +40,6 @@ jobs: - name: Test sysroot run: bazel build --config=x86_64_sysroot //sysroot/... - - name: Upload sysroot - uses: actions/upload-artifact@v3 - with: - name: debian_bullseye_x86_64_sysroot.tar.xz - path: sysroot/out/sysroot-build/bullseye/debian_bullseye_amd64_sysroot.tar.xz - - - name: Release sysroot if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') uses: svenstaro/upload-release-action@v1-release