-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2f83ecb
commit 7cf2fae
Showing
6 changed files
with
49 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,68 +37,10 @@ steps: | |
- cd tests/bottle-hashes/ | ||
- ./test-hash-insert.sh | ||
|
||
- label: build via nix | ||
commands: | ||
# NOTE: if this changes, remember to update the instructions in the nix/README.md too | ||
- nix build . -o binaries | ||
branches: "!master" | ||
- label: check flake | ||
commands: | ||
- nix flake check -L | ||
branches: "!master" | ||
# nix builds are usually cached, so we don't care about only_changes setting for it | ||
|
||
- label: build-via-docker | ||
# this step is used as a dependency, so we're defining 'key' explicitely | ||
key: build-via-docker | ||
commands: | ||
- eval "$SET_VERSION" | ||
- cd docker | ||
- ./docker-static-build.sh | ||
artifact_paths: | ||
- ./docker/octez-* | ||
only_changes: &static_binaries_changes_regexes | ||
- docker/build/.*.sh | ||
- docker/build/Dockerfile | ||
- docker/docker-static-build.sh | ||
- meta.json | ||
- protocols.json | ||
|
||
- label: build-arm-via-docker | ||
# this step is used as a dependency, so we're defining 'key' explicitely | ||
key: build-arm-via-docker | ||
commands: | ||
- eval "$SET_VERSION" | ||
- cd docker | ||
- ./docker-static-build.sh | ||
- > | ||
for f in ./octez-*; do | ||
mv "\$f" "\$f-arm64" | ||
done | ||
artifact_paths: | ||
- ./docker/octez-* | ||
agents: | ||
queue: "arm64-darwin" | ||
only_changes: *static_binaries_changes_regexes | ||
|
||
- label: test docker-built binaries | ||
commands: | ||
- buildkite-agent artifact download "docker/*" . --step "build-via-docker" | ||
- chmod +x ./docker/* | ||
- nix-build . -A binaries-test --no-out-link --arg path-to-binaries ./docker | ||
branches: "!master" | ||
depends_on: | ||
- "build-via-docker" | ||
only_changes: | ||
- tests/tezos-binaries.nix | ||
- tests/test_script.py | ||
# files from nix/ are massively used in tests infrastructure | ||
- nix/.* | ||
|
||
- label: test deb source packages via docker | ||
commands: | ||
- eval "$SET_VERSION" | ||
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type source | ||
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type source -p tezos-baker-PtQenaB1 | ||
artifact_paths: | ||
- ./out/* | ||
branches: "!master" | ||
|
@@ -116,122 +58,9 @@ steps: | |
- eval "$SET_VERSION" | ||
# Building all binary packages will take significant amount of time, so we build only one | ||
# in order to ensure package generation sanity | ||
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type binary -p tezos-baker-PsParisC | ||
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type binary -p tezos-baker-PtQenaB1 | ||
- rm -rf out | ||
# It takes much time to build binary package, so we do it only on master | ||
branches: "master" | ||
timeout_in_minutes: 240 | ||
only_changes: *ubuntu_native_packaging_changes_regexes | ||
|
||
- label: test rpm source packages via docker | ||
commands: | ||
- eval "$SET_VERSION" | ||
- nix develop .#docker-tezos-packages -c ./docker/build/fedora/build.py --type source | ||
artifact_paths: | ||
- ./out/* | ||
branches: "!master" | ||
timeout_in_minutes: 60 | ||
only_changes: &fedora_native_packaging_changes_regexes | ||
- docker/package/.* | ||
- docker/build/fedora/build.py | ||
- docker/build/util/build.py | ||
- docker/baking/.* | ||
- meta.json | ||
- protocols.json | ||
|
||
- label: test rpm binary packages via docker | ||
commands: | ||
- eval "$SET_VERSION" | ||
# Building all binary packages will take significant amount of time, so we build only one | ||
# in order to ensure package generation sanity | ||
- nix develop .#docker-tezos-packages -c ./docker/build/fedora/build.py --type binary -p tezos-baker-PsParisC | ||
- rm -rf out | ||
# It takes much time to build binary package, so we do it only on master | ||
branches: "master" | ||
timeout_in_minutes: 180 | ||
only_changes: *fedora_native_packaging_changes_regexes | ||
|
||
- label: build deb packages with static binaries | ||
key: build-static-deb | ||
depends_on: | ||
- "build-via-docker" | ||
commands: | ||
- eval "$SET_VERSION" | ||
- buildkite-agent artifact download "docker/octez-*" . --step build-via-docker | ||
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type binary --binaries-dir docker --distributions focal | ||
artifact_paths: | ||
- ./out/* | ||
timeout_in_minutes: 240 | ||
only_changes: *ubuntu_native_packaging_changes_regexes | ||
|
||
- label: test gen_systemd_service_file.py script | ||
commands: | ||
- eval "$SET_VERSION" | ||
- nix develop .#autorelease -c ./gen_systemd_service_file.py tezos-node | ||
branches: "!master" | ||
only_changes: | ||
- gen_systemd_service_file.py | ||
- docker/package/.* | ||
|
||
- label: test bundled systemd services | ||
# Used in .buildkite/hooks/pre-exit | ||
key: test-systemd-services | ||
depends_on: | ||
- "build-static-deb" | ||
only_changes: | ||
- :<< *ubuntu_native_packaging_changes_regexes | ||
- tests/systemd/.* | ||
agents: | ||
queue: "default" | ||
commands: | ||
- buildkite-agent artifact download "out/*~focal_amd64.deb" . --step build-static-deb | ||
- cd tests/systemd | ||
- nix shell ../..#legacyPackages.x86_64-linux.vagrant ../..#legacyPackages.x86_64-linux.curl -c vagrant --packages-directory=../../out up --provider=libvirt | ||
retry: | ||
automatic: | ||
limit: 3 | ||
|
||
- label: create auto release/pre-release | ||
key: auto-release | ||
commands: | ||
- mkdir binaries | ||
- mkdir arm-binaries | ||
- buildkite-agent artifact download "docker/*" binaries --step "build-via-docker" | ||
- buildkite-agent artifact download "docker/*" arm-binaries --step "build-arm-via-docker" | ||
- ls binaries | ||
- nix develop .#autorelease -c ./scripts/autorelease.sh "$BUILDKITE_MESSAGE" | ||
branches: master | ||
depends_on: | ||
- "build-via-docker" | ||
- "build-arm-via-docker" | ||
only_changes: | ||
- scripts/autorelease.sh | ||
- scripts/shell.nix | ||
# files from 'nix/' directory are used in the autorelease script | ||
- nix/.* | ||
- tezos-release.nix | ||
- release.nix | ||
|
||
# Update mirror repositories on master if brew formulae have been updated or bottle hashes added | ||
- label: update stable mirror repository | ||
if: | | ||
build.branch == "master" && | ||
( build.message =~ /^Merge pull request .* from serokell\/auto\/v[0-9]+\.[0-9]+-release/ || | ||
build.message =~ /^Merge pull request .* from serokell\/auto\/update-brew-formulae-v[.0-9]+-[0-9]+/ ) | ||
depends_on: | ||
- "auto-release" | ||
env: | ||
MIRROR_REPO: "[email protected]:serokell/tezos-packaging-stable.git" | ||
commands: &update_mirror | ||
- git pull origin "$BUILDKITE_BRANCH:$BUILDKITE_BRANCH" | ||
- git push --mirror "$$MIRROR_REPO" | ||
|
||
- label: update RC mirror repository | ||
if: | | ||
build.branch == "master" && | ||
(build.message =~ /^Merge pull request .* from serokell\/auto\/v[0-9]+\.[0-9]+-(rc|beta).*-release/ || | ||
build.message =~ /^Merge pull request .* from serokell\/auto\/update-brew-formulae-v[.0-9]+-(rc|beta).*/) | ||
depends_on: | ||
- "auto-release" | ||
env: | ||
MIRROR_REPO: "[email protected]:serokell/tezos-packaging-rc.git" | ||
commands: *update_mirror |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,7 +112,6 @@ def get_build_deps(binaries_dir): | |
"unzip", | ||
"rsync", | ||
"gcc", | ||
"cargo", | ||
"opam", | ||
"git", | ||
"autoconf", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env python3 | ||
# SPDX-FileCopyrightText: 2024 Oxhead Alpha | ||
# SPDX-License-Identifier: LicenseRef-MIT-OA | ||
|
||
import subprocess | ||
import os | ||
|
||
os.chdir("tezos/src/rust_deps") | ||
subprocess.run(["cargo-1.78", "vendor"], check=True) | ||
|
||
with open(".cargo/config.toml", "a") as f: | ||
f.write( | ||
""" | ||
[source.crates-io] | ||
replace-with = "vendored-sources" | ||
[source.vendored-sources] | ||
directory = "vendor" | ||
""" | ||
) | ||
|
||
# FIXME dirty hack to make dune copy vendor directory to the build directory | ||
with open("dune", "r") as f: | ||
dune = f.read() | ||
|
||
with open("dune", "w") as f: | ||
f.write(dune.replace("(source_tree .cargo)", "(source_tree .cargo) (source_tree vendor)")) |