Skip to content

Commit

Permalink
[GHA MAC] Add delay between each mac VM
Browse files Browse the repository at this point in the history
+ keep reverse list only for JDK ones
  -> Try to reduce submission concurrency
ci release
  • Loading branch information
RoiArthurB committed Apr 21, 2022
1 parent ed64a99 commit b499af3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/github-travis.yml
Expand Up @@ -120,9 +120,12 @@ jobs:
matrix:
toSignedZipName: [Gama1.7-macosx.cocoa.x86_64, Gama1.7-macosx.cocoa.x86_64_withJDK, Gama1.7-macosx.cocoa.aarch64, Gama1.7-macosx.cocoa.aarch64_withJDK]
steps:
- name: Delay x86_64 jobs
if: contains(matrix.toSignedZipName, 'x86_64')
run: sleep 60
- name: Delay JDK jobs
if: contains(matrix.toSignedZipName, 'withJDK')
run: sleep 450
run: sleep 100

- name: Prepare vm
run: |
Expand Down Expand Up @@ -157,6 +160,7 @@ jobs:
# Variables
MACOS_DEV_ID: ${{ secrets.MACOS_DEV_ID }}
MACOS_KEYCHAIN_PWD: ${{ secrets.MACOS_KEYCHAIN_PWD }}
isWithJDK: contains(matrix.toSignedZipName, 'withJDK')
run: |
# Unlock
security unlock-keychain -p "$MACOS_KEYCHAIN_PWD" build.keychain
Expand Down
19 changes: 15 additions & 4 deletions travis/mac-sign.sh
Expand Up @@ -10,7 +10,12 @@ function signInJar(){

sed -i -e '/META-INF/d' filelist.txt

tail -r filelist.txt > reverse-filelist.txt
# Reverse list to prevent concurrency signature submition per architecture
if [[ $isWithJDK ]]; then
tail -r filelist.txt > reverse-filelist.txt
rm filelist.txt
mv reverse-filelist.txt filelist.txt
fi

while read f
do
Expand All @@ -27,11 +32,17 @@ function signInJar(){
fi

jar uf "$1" "$f"
done < reverse-filelist.txt
done < filelist.txt
}

find ./ -name "*jar" > jarlist.txt
tail -r jarlist.txt > reverse-jarlist.txt

# Reverse list to prevent concurrency signature submition per architecture
if [[ $isWithJDK ]]; then
tail -r filelist.txt > reverse-filelist.txt
rm filelist.txt
mv reverse-filelist.txt filelist.txt
fi

# Sign .jar files
while read j
Expand All @@ -41,7 +52,7 @@ do
find . -not -wholename "*Gama.app*" -delete

echo "xxx"
done < reverse-jarlist.txt
done < jarlist.txt

# Sign single lib files
find ./ \( -name "*dylib" -o -name "*.so" -o -name "*.jnilib" \) -exec codesign --timestamp --force -s "$MACOS_DEV_ID" -v {} \;

0 comments on commit b499af3

Please sign in to comment.