forked from wrf-model/WRF
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Automate building of Windows and macOS release binaries (#20)
- Loading branch information
Showing
8 changed files
with
109 additions
and
10 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,47 @@ | ||
steps: | ||
- ${{ if eq(parameters.OS_NAME, 'Windows') }}: | ||
- task: ArchiveFiles@2 | ||
inputs: | ||
rootFolderOrFile: build/install | ||
includeRootFolder: false | ||
archiveType: zip | ||
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.SourceBranchName)-$(NESTING)_nesting-$(MODE)-x64-$(OS_NAME)-$(BUILD_TYPE).zip' | ||
displayName: Create distribution package | ||
|
||
- ${{ if not(eq(parameters.OS_NAME, 'Windows')) }}: | ||
- bash: bash .ci/unix/delocate.sh | ||
displayName: Delocate | ||
|
||
- task: ArchiveFiles@2 | ||
inputs: | ||
rootFolderOrFile: build/install | ||
includeRootFolder: false | ||
archiveType: tar | ||
tarCompression: xz | ||
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.SourceBranchName)-$(NESTING)_nesting-$(MODE)-x64-$(OS_NAME)-$(BUILD_TYPE).tar.xz' | ||
displayName: Create distribution package | ||
|
||
- pwsh: | | ||
dir $(Build.ArtifactStagingDirectory) -r | % { if ($_.Name -cne $_.Name.ToLower()) { ren $_.FullName $_.Name.ToLower() } } | ||
displayName: Rename to lowercase | ||
|
||
# not strictly needed | ||
- task: PublishBuildArtifacts@1 | ||
displayName: Store distribution package | ||
inputs: | ||
pathtoPublish: $(Build.ArtifactStagingDirectory) | ||
artifactName: dist_$(OS_NAME)_$(BUILD_SYSTEM)_$(BUILD_TYPE)_$(MODE) | ||
|
||
- task: GithubRelease@0 | ||
displayName: Create GitHub Draft Release | ||
inputs: | ||
gitHubConnection: WRF-CMake-releases | ||
repositoryName: WRF-CMake/WRF | ||
action: edit # will create if not existing | ||
tag: $(Build.SourceBranchName) | ||
isDraft: true | ||
isPreRelease: true | ||
addChangeLog: false | ||
assetUploadMode: replace | ||
assets: | | ||
$(Build.ArtifactStagingDirectory)/* |
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
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,5 +1,5 @@ | ||
brew "coreutils" | ||
brew "gcc@8" | ||
brew "gcc" | ||
brew "netcdf" | ||
brew "jasper" | ||
brew "libpng" | ||
|
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,20 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2018 M. Riechert and D. Meyer. Licensed under the MIT License. | ||
|
||
set -ex | ||
|
||
SCRIPTDIR=$(dirname "$0") | ||
cd $SCRIPTDIR/../.. | ||
|
||
if [ "$(uname)" == "Darwin" ]; then | ||
|
||
pip3 install delocate | ||
delocate-listdeps --all --depending build/install/main | ||
delocate-path build/install/main | ||
delocate-listdeps --all --depending build/install/main | ||
|
||
else | ||
echo "Unknown OS: $(uname)" | ||
exit 1 | ||
fi |
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,19 @@ | ||
# First, create a tag for the new version. | ||
# Then, run this pipeline on the tag to store binaries in a draft GitHub release. | ||
|
||
# Note that these values are also overridden to "none" in Azure DevOps's UI to | ||
# prevent others to run this pipeline by changing the triggers below and opening a PR. | ||
# It still wouldn't cause harm as secrets (GitHub credentials) are not available to PRs from forks. | ||
trigger: none | ||
pr: none | ||
|
||
jobs: | ||
- template: .ci/azure-pipelines/matrix.yml | ||
parameters: | ||
OS_NAMES: [Windows, macOS] # TODO Linux | ||
BUILD_SYSTEMS: [CMake] | ||
BUILD_TYPES: [Debug, Release] | ||
MODES: [serial, dmpar] | ||
WATS_DIFF: false | ||
WATS_PLOTS: false | ||
RELEASE: true |