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