-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
6 changed files
with
206 additions
and
18 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
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,79 @@ | ||
#!/bin/bash | ||
|
||
set -euxo pipefail | ||
|
||
ci_build_dir=$SMALLTALK_CI_BUILD | ||
package_dir="$PROJECT_NAME-$PLATFORM" | ||
vm_dir=`cat $SMALLTALK_CI_VM | sed 's|\(.*\)/.*|\1|'`/pharo-vm | ||
|
||
mkdir -p "$package_dir/image" | ||
|
||
cp -r $vm_dir/Pharo.app/ $package_dir/Pharo.app | ||
|
||
cp $ci_build_dir/TravisCI.image $package_dir/image/$PROJECT_NAME.image | ||
cp $ci_build_dir/TravisCI.changes $package_dir/image/$PROJECT_NAME.changes | ||
cp $ci_build_dir/*.sources $package_dir/image | ||
|
||
cat << EOF > $package_dir/$PROJECT_NAME | ||
#!/bin/bash | ||
\`dirname "\$0"\`/Pharo.app/Contents/MacOS/Pharo \`dirname "\$0"\`/image/$PROJECT_NAME.image | ||
EOF | ||
|
||
chmod a+rx $package_dir/$PROJECT_NAME | ||
|
||
cat << EOF > $package_dir/README.txt | ||
-- Opening OpenPonk on macOS 10 and 11 -- | ||
Main issue of opening OpenPonk on macOS 10 is Gatekeeper protection against executables from unverified sources. | ||
There are two options to overcome it. | ||
First option requires a little more clicking each time opening OpenPonk, but very simple first time setup, | ||
Second option requires much more steps first time opening (or after updating OP), but further opening becomes simple double click. | ||
First option: | ||
First time opening (or after updating OP): | ||
1) Double click Pharo.app | ||
-> "Pharo cannot be opened because the developer cannot be verified" | ||
2) Cancel | ||
3) Right click Pharo.app | ||
4) Open | ||
-> "macOS cannot verify the developer of Pharo" | ||
5) Open | ||
-> Window with file selection opened | ||
6) Find and select file $PROJECT_NAME.image in the image folder | ||
-> "Pharo would like to access files"... | ||
7) OK | ||
-> OpenPonk should open now. If there is a window asking to receive keystrokes, you may Deny it | ||
Opening: | ||
1) Double click Pharo.app | ||
-> Window with file selection opened | ||
2) Find and select file $PROJECT_NAME.image in the image folder | ||
Second option: | ||
First time opening (or after updating OP): | ||
1) Right click the $PROJECT_NAME (Unix executable) | ||
2) Open | ||
-> "macOS cannot verify the developer of $PROJECT_NAME" | ||
3) Open | ||
-> "Pharo cannot be opened because the developer cannot be verified" | ||
4) Cancel | ||
5) Open macOS System Preferences... | ||
6) Security & Privacy | ||
7) Switch to General tab (if not already there) | ||
-> There should be text about "Pharo" or "Pharo.app" being blocked and Open Anyway button next to it. | ||
8) Click on Open Anyway button | ||
-> "macOS cannot verify the developer of Pharo" | ||
9) Open | ||
-> Window with file selection opened | ||
10) Cancel | ||
11) Double click $PROJECT_NAME (Unix executable) | ||
-> "Terminal would like to access files"... That, along with next step, might be skipped if the access is already granted. | ||
12) OK | ||
-> OpenPonk should open now. If there is a window asking to receive keystrokes, you may Deny it | ||
Opening: | ||
1) Double click $PROJECT_NAME (Unix executable) | ||
EOF | ||
|
||
$vm_dir/Pharo.app/Contents/MacOS/Pharo --headless $package_dir/image/$PROJECT_NAME.image eval --save "OPVersion currentWithRunId: $RUN_ID projectName: '$REPOSITORY_NAME'" | ||
|
||
zip -qr $PROJECT_NAME-$PLATFORM-$VERSION.zip $package_dir |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
PharoLightTheme beCurrent. | ||
PolymorphSystemSettings setDesktopLogoWith: OPIcons current logo asMorph. | ||
Smalltalk at: #OPUmlClassEditorPlugin ifPresent: [ :plugin | plugin allDefaultProfiles ]. | ||
PolymorphSystemSettings setDesktopLogoWith: OPIcons current logo asMorph. |
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 |
---|---|---|
|
@@ -20,7 +20,7 @@ env: | |
RUN_ID: ${{ github.run_id }} | ||
|
||
jobs: | ||
|
||
build-linux: | ||
runs-on: ubuntu-latest | ||
env: | ||
|
@@ -46,6 +46,31 @@ jobs: | |
path: ${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
key: ${{ github.run_id }}-${{ github.run_number }}_${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
|
||
build-mac: | ||
runs-on: macos-latest | ||
env: | ||
PLATFORM: mac | ||
name: 'Build Mac' | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
- name: Load SmalltalkCI environment | ||
uses: hpi-swa/[email protected] | ||
id: smalltalkci | ||
with: | ||
smalltalk-version: Pharo64-9.0 | ||
- name: Prepare image and test | ||
run: smalltalkci -s ${{ steps.smalltalkci.outputs.smalltalk-version }} | ||
shell: bash | ||
timeout-minutes: 10 | ||
- name: Create zip | ||
run: chmod u+x .github/scripts/build-mac.sh; ./.github/scripts/build-mac.sh | ||
- name: Cache zip | ||
uses: actions/[email protected] | ||
with: | ||
path: ${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
key: ${{ github.run_id }}-${{ github.run_number }}_${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
|
||
build-win: | ||
runs-on: windows-latest | ||
env: | ||
|
@@ -88,6 +113,23 @@ jobs: | |
if: steps.get-zip.outputs.cache-hit != 'true' | ||
run: exit 1 | ||
|
||
check-mac-cache: | ||
needs: build-mac | ||
runs-on: macos-latest | ||
name: 'Check Mac zip is created' | ||
env: | ||
PLATFORM: mac | ||
steps: | ||
- name: Get zip from cache | ||
id: get-zip | ||
uses: actions/[email protected] | ||
with: | ||
path: ${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
key: ${{ github.run_id }}-${{ github.run_number }}_${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
- name: Fail on cache miss | ||
if: steps.get-zip.outputs.cache-hit != 'true' | ||
run: exit 1 | ||
|
||
check-win-cache: | ||
needs: build-win | ||
runs-on: windows-latest | ||
|
@@ -106,7 +148,7 @@ jobs: | |
run: exit 1 | ||
|
||
create-release: | ||
needs: [check-linux-cache, check-win-cache] | ||
needs: [check-linux-cache, check-mac-cache, check-win-cache] | ||
runs-on: ubuntu-latest | ||
name: 'Re-create release' | ||
steps: | ||
|
@@ -147,6 +189,35 @@ jobs: | |
asset_name: ${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
asset_content_type: application/zip | ||
|
||
upload-mac-zip: | ||
needs: create-release | ||
runs-on: macos-latest | ||
name: 'Upload Mac zip' | ||
env: | ||
PLATFORM: mac | ||
steps: | ||
- name: Get zip from cache | ||
id: get-zip | ||
uses: actions/[email protected] | ||
with: | ||
path: ${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
key: ${{ github.run_id }}-${{ github.run_number }}_${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
- name: Get Release by Tag | ||
id: get_release_by_tag | ||
uses: jonfriesen/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: nightly | ||
- name: Upload zip | ||
id: upload-zip | ||
uses: actions/[email protected] | ||
with: | ||
upload_url: ${{ steps.get_release_by_tag.outputs.upload_url }} | ||
asset_path: ./${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
asset_name: ${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
asset_content_type: application/zip | ||
|
||
upload-win-zip: | ||
needs: create-release | ||
runs-on: windows-latest | ||
|
@@ -177,6 +248,7 @@ jobs: | |
asset_content_type: application/zip | ||
|
||
create-dependent-matrix: | ||
needs: [create-release] | ||
runs-on: ubuntu-latest | ||
name: 'Find dependent repositories' | ||
if: ${{ github.event_name == 'push' || contains(github.event.inputs.build-dependent || false, 'true') }} | ||
|
@@ -193,7 +265,7 @@ jobs: | |
run: echo "::set-output name=matrix::`cat ./.github/dependent-repositories.txt | tr -d " \t\n\r"`" | ||
|
||
build-dependent: | ||
needs: [check-linux-cache, check-win-cache, create-dependent-matrix] | ||
needs: [create-dependent-matrix] | ||
runs-on: ubuntu-latest | ||
name: 'Build dependent' | ||
if: ${{ contains(needs.create-dependent-matrix.outputs.matrix, '/') }} | ||
|
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 |
---|---|---|
|
@@ -41,6 +41,35 @@ jobs: | |
asset_name: ${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
asset_content_type: application/zip | ||
|
||
mac: | ||
runs-on: macos-latest | ||
env: | ||
PLATFORM: ${{ github.job }} | ||
name: 'Build Mac and upload zip' | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: hpi-swa/[email protected] | ||
id: smalltalkci | ||
with: | ||
smalltalk-version: Pharo64-9.0 | ||
- name: Prepare image and test | ||
run: smalltalkci -s ${{ steps.smalltalkci.outputs.smalltalk-version }} | ||
shell: bash | ||
timeout-minutes: 10 | ||
- name: Create zip | ||
run: chmod u+x .github/scripts/build-mac.sh; ./.github/scripts/build-mac.sh | ||
- name: Get release | ||
id: get_release | ||
uses: bruceadams/[email protected] | ||
- name: Upload zip | ||
id: upload-zip | ||
uses: actions/[email protected] | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: ./${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
asset_name: ${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
asset_content_type: application/zip | ||
|
||
win: | ||
runs-on: windows-latest | ||
env: | ||
|