Commit 4cd1a8f0db22d616db12aadf9424b0d1c624c69c
1 parent
aa864d21
Azure pipelines: no artifact upload/download from forks
Showing
3 changed files
with
10 additions
and
2 deletions
azure-pipelines.yml
| ... | ... | @@ -10,6 +10,7 @@ jobs: |
| 10 | 10 | pathtoPublish: '$(System.DefaultWorkingDirectory)/distfiles.zip' |
| 11 | 11 | artifactName: distfiles |
| 12 | 12 | displayName: 'Upload extra distribution files' |
| 13 | + condition: eq(variables['System.PullRequest.IsFork'], 'False') | |
| 13 | 14 | - job: Windows |
| 14 | 15 | pool: |
| 15 | 16 | vmImage: vs2017-win2016 |
| ... | ... | @@ -38,6 +39,7 @@ jobs: |
| 38 | 39 | inputs: |
| 39 | 40 | artifactName: distfiles |
| 40 | 41 | downloadPath: $(System.DefaultWorkingDirectory) |
| 42 | + condition: eq(variables['System.PullRequest.IsFork'], 'False') | |
| 41 | 43 | - script: azure-pipelines/build-windows.bat $(wordsize) $(tool) |
| 42 | 44 | displayName: 'Build, test, generate binary distributions' |
| 43 | 45 | - task: PublishBuildArtifacts@1 |
| ... | ... | @@ -45,6 +47,7 @@ jobs: |
| 45 | 47 | pathtoPublish: '$(System.DefaultWorkingDirectory)/installers' |
| 46 | 48 | artifactName: installers |
| 47 | 49 | displayName: 'Upload binary distributions' |
| 50 | + condition: eq(variables['System.PullRequest.IsFork'], 'False') | |
| 48 | 51 | dependsOn: Linux |
| 49 | 52 | condition: succeeded() |
| 50 | 53 | - job: macOS |
| ... | ... | @@ -56,6 +59,7 @@ jobs: |
| 56 | 59 | inputs: |
| 57 | 60 | artifactName: distfiles |
| 58 | 61 | downloadPath: $(System.DefaultWorkingDirectory) |
| 62 | + condition: eq(variables['System.PullRequest.IsFork'], 'False') | |
| 59 | 63 | - script: azure-pipelines/build-mac |
| 60 | 64 | displayName: 'Mac build and test' |
| 61 | 65 | dependsOn: Linux | ... | ... |
azure-pipelines/build-mac
| ... | ... | @@ -7,7 +7,9 @@ cd jpeg-9c |
| 7 | 7 | make |
| 8 | 8 | sudo make install |
| 9 | 9 | cd .. |
| 10 | -unzip distfiles/distfiles.zip | |
| 10 | +if [ -f distfiles/distfiles.zip ]; then | |
| 11 | + unzip distfiles/distfiles.zip | |
| 12 | +fi | |
| 11 | 13 | ./configure --enable-werror --enable-show-failed-test-output |
| 12 | 14 | make -j$(nproc) |
| 13 | 15 | make -k check | ... | ... |
azure-pipelines/build-windows
| ... | ... | @@ -17,7 +17,9 @@ if [[ $tool == mingw ]]; then |
| 17 | 17 | elif [[ $tool == msvc ]]; then |
| 18 | 18 | cl |
| 19 | 19 | fi |
| 20 | -unzip distfiles/distfiles.zip | |
| 20 | +if [ -f distfiles/distfiles.zip ]; then | |
| 21 | + unzip distfiles/distfiles.zip | |
| 22 | +fi | |
| 21 | 23 | curl -L https://downloads.sourceforge.net/project/qpdf/external-libs/2017-08-21/qpdf-external-libs-bin.zip -o qpdf-external-libs-bin.zip |
| 22 | 24 | unzip qpdf-external-libs-bin.zip |
| 23 | 25 | cwd=`pwd` | ... | ... |