summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-03 09:22:10 -0400
committerGitHub <noreply@github.com>2020-08-03 09:22:10 -0400
commit52580b9dc7728dd66b8f3f44f73946bb833dafb2 (patch)
treee8f031aaa8cd561a4819f1cd741d1d358a13c1a7
parent96ece0ca56fca249bcf84061de0e944f3c092ea5 (diff)
parentdaaccf8896fb759e31e71a168e6354eb71fa596d (diff)
downloadpodman-52580b9dc7728dd66b8f3f44f73946bb833dafb2.tar.gz
podman-52580b9dc7728dd66b8f3f44f73946bb833dafb2.tar.bz2
podman-52580b9dc7728dd66b8f3f44f73946bb833dafb2.zip
Merge pull request #7076 from alvistack/master-linux-amd64
Speedup static build by utilizing CI cache on `/nix` folder
-rw-r--r--.cirrus.yml20
-rw-r--r--nix/nixpkgs.json6
2 files changed, 19 insertions, 7 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index a8f3a2817..22f84d7ec 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -760,21 +760,33 @@ success_task:
static_build_task:
depends_on:
- "gating"
+
gce_instance:
image_name: "${FEDORA_CACHE_IMAGE_NAME}"
cpu: 8
memory: 12
disk: 200
- script: |
+
+ init_script: |
set -ex
setenforce 0
growpart /dev/sda 1 || true
resize2fs /dev/sda1 || true
yum -y install podman
+
+ nix_cache:
+ folder: '.cache'
+ fingerprint_script: |
+ echo "nix-v1-$(sha1sum nix/nixpkgs.json | head -c 40)"
+
+ build_script: |
+ set -ex
mkdir -p /nix
- podman run --rm --privileged -ti -v /:/mnt nixos/nix cp -rfT /nix /mnt/nix
+ mkdir -p .cache
+ mount --bind .cache /nix
+ if [[ -z $(ls -A /nix) ]]; then podman run --rm --privileged -ti -v /:/mnt nixos/nix cp -rfT /nix /mnt/nix; fi
podman run --rm --privileged -ti -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} nixos/nix nix --print-build-logs --option cores 8 --option max-jobs 8 build --file nix/
+ chown -Rf $(whoami) .cache
+
binaries_artifacts:
path: "result/bin/podman"
- on_failure:
- failed_branch_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_branch_failure.sh |& ${TIMESTAMP}'
diff --git a/nix/nixpkgs.json b/nix/nixpkgs.json
index 98ed710a4..8eeb4f470 100644
--- a/nix/nixpkgs.json
+++ b/nix/nixpkgs.json
@@ -1,7 +1,7 @@
{
"url": "https://github.com/nixos/nixpkgs",
- "rev": "02591d02a910b3b92092153c5f3419a8d696aa1d",
- "date": "2020-07-09T03:52:28+02:00",
- "sha256": "1pp9v4rqmgx1b298gxix8b79m8pvxy1rcf8l25rxxxxnkr5ls1ng",
+ "rev": "b49e7987632e4c7ab3a093fdfc433e1826c4b9d7",
+ "date": "2020-07-26T09:18:52+02:00",
+ "sha256": "1mj6fy0p24izmasl653s5z4f2ka9v3b6mys45kjrqmkv889yk2r6",
"fetchSubmodules": false
}