Skip to content

Commit ee56705

Browse files
committed
COMP: Attempt to fix restoration of cache in upload job
This commit is an attempt to fix errors like the following: ``` [...] Found a cache from build 718 at applauncher-build-934889f29d7d1ea60adf7b6d8844028749872863 Size: 103 MiB Cached paths: * /usr/src/AppLauncher-build Downloading cache archive... Validating cache... Download duration for cache file /tmp/cache1192561374: 2.771237192s Unarchiving cache... Skipping writing "usr/src/AppLauncher-build/" - mkdir /usr/src/AppLauncher-build: permission denied Skipping writing "usr/src/AppLauncher-build/Base/" - mkdir /usr/src/AppLauncher-build: permission denied [...] /bin/bash: line 6: cd: /usr/src/AppLauncher: No such file or directory ```
1 parent 9b7e7ad commit ee56705

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

.circleci/config.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
version: 2
22
jobs:
33
build-package-test:
4-
working_directory: /usr/src/AppLauncher
4+
working_directory: /home/circleci/project/AppLauncher
55
docker:
66
- image: commontk/qt-static:4.8.6-centos-5.5
77
steps:
88
- checkout
99
- run:
1010
command: |
11-
/usr/src/AppLauncher/docker-build-package.sh
11+
/home/circleci/project/AppLauncher/docker-build-package.sh
1212
- save_cache:
1313
key: applauncher-src-{{ .Revision }}
14-
paths: /usr/src/AppLauncher
14+
paths: /home/circleci/project/AppLauncher
1515
- save_cache:
1616
key: applauncher-build-{{ .Revision }}
17-
paths: /usr/src/AppLauncher-build
17+
paths: /home/circleci/project/AppLauncher-build
1818

1919
test:
20+
working_directory: /home/circleci/project/AppLauncher
2021
docker:
2122
- image: thewtex/opengl:debian
2223
steps:
@@ -36,12 +37,13 @@ jobs:
3637
3738
- run:
3839
command: |
39-
export APP="sudo chown -R user.user /usr/src/AppLauncher-build && cd /usr/src/AppLauncher-build && ctest -LE 'CompilerRequired' -VV"
40+
export APP="sudo chown -R user.user /home/circleci/project/AppLauncher-build && cd /home/circleci/project/AppLauncher-build && ctest -LE 'CompilerRequired' -VV"
4041
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
4142
[ "$(cat /tmp/graphical-app.return_code)" = 0 ]
4243
4344
4445
upload:
46+
working_directory: /home/circleci/project/AppLauncher
4547
docker:
4648
- image: cimg/python:3.10
4749
steps:
@@ -59,14 +61,14 @@ jobs:
5961
# See https://urllib3.readthedocs.io/en/latest/v2-migration-guide.html#ssl-module-is-compiled-with-openssl-1-0-2-k-fips
6062
python -c "import requests"
6163
if [[ "${CIRCLE_BRANCH}" == "main" ]]; then
62-
cd /usr/src/AppLauncher
64+
cd /home/circleci/project/AppLauncher
6365
ci_addons publish_github_release commontk/applauncher \
6466
--exit-success-if-missing-token \
6567
--prerelease-sha main \
66-
--prerelease-packages /usr/src/AppLauncher-build/CTKAppLauncher-*.tar.gz \
68+
--prerelease-packages /home/circleci/project/AppLauncher-build/CTKAppLauncher-*.tar.gz \
6769
--prerelease-packages-clear-pattern "*linux*" \
6870
--prerelease-packages-keep-pattern "*<COMMIT_SHORT_SHA>*" \
69-
--release-packages /usr/src/AppLauncher-build/CTKAppLauncher-*.tar.gz
71+
--release-packages /home/circleci/project/AppLauncher-build/CTKAppLauncher-*.tar.gz
7072
fi
7173
workflows:
7274
version: 2

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ FROM commontk/qt-static:4.8.6-centos-5.5
22
MAINTAINER CommonTK Community <ctk-developers@commontk.org>
33
# Build and package the CTK AppLauncher
44

5-
WORKDIR /usr/src
5+
WORKDIR /home/circleci/project
66

77
RUN git clone https://github.com/commontk/AppLauncher.git
8-
VOLUME /usr/src/AppLauncher
8+
VOLUME /home/circleci/project/AppLauncher
99

10-
RUN mkdir /usr/src/AppLauncher-build
11-
WORKDIR /usr/src/AppLauncher-build
10+
RUN mkdir /home/circleci/project/AppLauncher-build
11+
WORKDIR /home/circleci/project/AppLauncher-build
1212
ADD docker-build-package.sh /usr/bin/build-package.sh
1313
RUN /usr/bin/build-package.sh
14-
VOLUME /usr/src/AppLauncher-build
14+
VOLUME /home/circleci/project/AppLauncher-build

docker-build-package.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
set -ex
44

5-
mkdir -p /usr/src/AppLauncher-build
6-
cd /usr/src/AppLauncher-build
5+
mkdir -p /home/circleci/project/AppLauncher-build
6+
cd /home/circleci/project/AppLauncher-build
77
rm -rf *
88

99
cmake \
1010
-DCMAKE_BUILD_TYPE:STRING=Release \
1111
-DBUILD_TESTING:BOOL=ON \
1212
-DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/src/qt-everywhere-opensource-release-build-4.8.6/bin/qmake \
13-
/usr/src/AppLauncher
13+
/home/circleci/project/AppLauncher
1414
make -j$(grep -c processor /proc/cpuinfo)
1515
make package
1616
ctest -L 'CompilerRequired' -j$(grep -c processor /proc/cpuinfo)

0 commit comments

Comments
 (0)