mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
build: remove sas, backup_cache logic
This commit is contained in:
26
.github/workflows/linux-pipeline.yml
vendored
26
.github/workflows/linux-pipeline.yml
vendored
@@ -54,7 +54,6 @@ jobs:
|
||||
options: --user root
|
||||
volumes:
|
||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||
- /var/run/sas:/var/run/sas
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
@@ -166,36 +165,20 @@ jobs:
|
||||
if: steps.check-cache.outputs.cache_exists == 'false'
|
||||
run: |
|
||||
echo "Uncompressed src size: $(du -sh src | cut -f1 -d' ')"
|
||||
tar -cvf $DEPSHASH.tar src
|
||||
tar -cf $DEPSHASH.tar src
|
||||
echo "Compressed src to $(du -sh $DEPSHASH.tar | cut -f1 -d' ')"
|
||||
- name: Move src folder to cross-OS portal
|
||||
if: steps.check-cache.outputs.cache_exists == 'false'
|
||||
run: |
|
||||
cp ./$DEPSHASH.tar /mnt/cross-instance-cache/
|
||||
sudo mkdir -p /var/portal
|
||||
sudo chown -R $(id -u):$(id -g) /var/portal
|
||||
mv ./src /var/portal
|
||||
- name: Persist Src Cache
|
||||
if: steps.check-cache.outputs.cache_exists == 'false'
|
||||
run: |
|
||||
backup_cache_path=/var/portal
|
||||
final_cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
|
||||
echo "Using cache key: $DEPSHASH"
|
||||
echo "Checking path: $final_cache_path"
|
||||
if [ ! -f "$final_cache_path" ]; then
|
||||
echo "Cache key not found, storing tarball"
|
||||
tmp_container=/mnt/cross-instance-cache/tmp/${{ github.sha }}
|
||||
tmp_cache_path=$tmp_container/$DEPSHASH.tar
|
||||
mkdir -p $tmp_container
|
||||
if [ -f "$backup_cache_path" ]; then
|
||||
tar -cf $tmp_cache_path -C $(dirname $backup_cache_path) ./$(basename $backup_cache_path)
|
||||
else
|
||||
tar -cf $tmp_cache_path -C $backup_cache_path/ ./
|
||||
fi
|
||||
mv -vn $tmp_cache_path $final_cache_path
|
||||
rm -rf $tmp_container
|
||||
echo "Cache key not found"
|
||||
exit 1
|
||||
else
|
||||
echo "Cache key already exists, skipping.."
|
||||
echo "Cache key persisted in $final_cache_path"
|
||||
fi
|
||||
build:
|
||||
strategy:
|
||||
@@ -210,7 +193,6 @@ jobs:
|
||||
options: --user root
|
||||
volumes:
|
||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||
- /var/run/sas:/var/run/sas
|
||||
needs: checkout
|
||||
steps:
|
||||
- name: Load Build Tools
|
||||
|
||||
22
.github/workflows/macos-pipeline.yml
vendored
22
.github/workflows/macos-pipeline.yml
vendored
@@ -181,34 +181,18 @@ jobs:
|
||||
echo "Uncompressed src size: $(du -sh src | cut -f1 -d' ')"
|
||||
tar -cf $DEPSHASH.tar src
|
||||
echo "Compressed src to $(du -sh $DEPSHASH.tar | cut -f1 -d' ')"
|
||||
- name: Move src folder to cross-OS portal
|
||||
if: steps.check-cache.outputs.cache_exists == 'false'
|
||||
run: |
|
||||
cp ./$DEPSHASH.tar /mnt/cross-instance-cache/
|
||||
sudo mkdir -p /var/portal
|
||||
sudo chown -R $(id -u):$(id -g) /var/portal
|
||||
mv ./src /var/portal
|
||||
- name: Persist Src Cache
|
||||
if: steps.check-cache.outputs.cache_exists == 'false'
|
||||
run: |
|
||||
backup_cache_path=/var/portal
|
||||
final_cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
|
||||
echo "Using cache key: $DEPSHASH"
|
||||
echo "Checking path: $final_cache_path"
|
||||
if [ ! -f "$final_cache_path" ]; then
|
||||
echo "Cache key not found, storing tarball"
|
||||
tmp_container=/mnt/cross-instance-cache/tmp/${{ github.sha }}
|
||||
tmp_cache_path=$tmp_container/$DEPSHASH.tar
|
||||
mkdir -p $tmp_container
|
||||
if [ -f "$backup_cache_path" ]; then
|
||||
tar -cf $tmp_cache_path -C $(dirname $backup_cache_path) ./$(basename $backup_cache_path)
|
||||
else
|
||||
tar -cf $tmp_cache_path -C $backup_cache_path/ ./
|
||||
fi
|
||||
mv -vn $tmp_cache_path $final_cache_path
|
||||
rm -rf $tmp_container
|
||||
echo "Cache key not found"
|
||||
exit 1
|
||||
else
|
||||
echo "Cache key already exists, skipping.."
|
||||
echo "Cache key persisted in $final_cache_path"
|
||||
fi
|
||||
build:
|
||||
strategy:
|
||||
|
||||
Reference in New Issue
Block a user