Skip to content

Commit

Permalink
Update uploading configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
whyoleg committed Dec 29, 2023
1 parent 2762d1b commit 7cb8b58
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 55 deletions.
40 changes: 30 additions & 10 deletions .github/workflows/build.main.kts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,12 @@ workflow(
sourceFile = __FILE__.toPath(),
) {
val version = expr("inputs.version")
configurations.forEach { configuration ->
job(id = configuration.name, runsOn = configuration.runnerType) {
val jobs = configurations.map { configuration ->
job(
id = configuration.name,
name = "${configuration.name}-$version",
runsOn = configuration.runnerType
) {
uses(action = CheckoutV4(submodules = true))
uses(action = SetupPythonV5(pythonVersion = "3.x"))
run(command = "pip install conan")
Expand All @@ -112,26 +116,42 @@ workflow(
}

configuration.profiles.forEach { (profile, supportsShared) ->
run(command = conanCreateCommand(profile, version, "False"))
run(command = conanInstallCommand(profile, version, "False"))
if (supportsShared) {
run(command = conanCreateCommand(profile, version, "True"))
run(command = conanInstallCommand(profile, version, "True"))
}
run(command = conanCreateCommand(profile, version, "False"))
run(command = conanInstallCommand(profile, version, "False"))
}

// V4 has different behaviour
@Suppress("DEPRECATION")
uses(
action = UploadArtifactV3(
name = "openssl-$version",
ifNoFilesFound = UploadArtifactV3.BehaviorIfNoFilesFound.Error,
action = UploadArtifactV4(
name = "openssl-${configuration.name}-$version",
ifNoFilesFound = UploadArtifactV4.BehaviorIfNoFilesFound.Error,
path = listOf(
"build/openssl3/*/lib/*",
"build/openssl3/*/dynamicLib/*",
"build/openssl3/*/staticLib/*",
"build/openssl3/*/include/*",
)
)
)
}
}

job(id = "aggregate", runsOn = UbuntuLatest, needs = jobs) {
uses(
action = DownloadArtifactV4(
pattern = "openssl-*-$version",
mergeMultiple = true,
path = "openssl"
)
)
uses(
action = UploadArtifactV4(
name = "openssl-$version",
ifNoFilesFound = UploadArtifactV4.BehaviorIfNoFilesFound.Error,
path = listOf("openssl")
)
)
}
}.writeToFile(addConsistencyCheck = false)
115 changes: 70 additions & 45 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
required: true
jobs:
macos:
name: 'macos-${{ inputs.version }}'
runs-on: 'macos-latest'
steps:
- id: 'step-0'
Expand Down Expand Up @@ -71,30 +72,32 @@ jobs:
- id: 'step-25'
run: 'conan install packages/openssl3 --output-folder build/openssl3/ios-simulator-x64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/ios-simulator-x64 -o "*:shared=False"'
- id: 'step-26'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/macos-x64 -o "*:shared=False"'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/macos-x64 -o "*:shared=True"'
- id: 'step-27'
run: 'conan install packages/openssl3 --output-folder build/openssl3/macos-x64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/macos-x64 -o "*:shared=False"'
run: 'conan install packages/openssl3 --output-folder build/openssl3/macos-x64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/macos-x64 -o "*:shared=True"'
- id: 'step-28'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/macos-x64 -o "*:shared=True"'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/macos-x64 -o "*:shared=False"'
- id: 'step-29'
run: 'conan install packages/openssl3 --output-folder build/openssl3/macos-x64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/macos-x64 -o "*:shared=True"'
run: 'conan install packages/openssl3 --output-folder build/openssl3/macos-x64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/macos-x64 -o "*:shared=False"'
- id: 'step-30'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/macos-arm64 -o "*:shared=False"'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/macos-arm64 -o "*:shared=True"'
- id: 'step-31'
run: 'conan install packages/openssl3 --output-folder build/openssl3/macos-arm64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/macos-arm64 -o "*:shared=False"'
run: 'conan install packages/openssl3 --output-folder build/openssl3/macos-arm64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/macos-arm64 -o "*:shared=True"'
- id: 'step-32'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/macos-arm64 -o "*:shared=True"'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/macos-arm64 -o "*:shared=False"'
- id: 'step-33'
run: 'conan install packages/openssl3 --output-folder build/openssl3/macos-arm64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/macos-arm64 -o "*:shared=True"'
run: 'conan install packages/openssl3 --output-folder build/openssl3/macos-arm64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/macos-arm64 -o "*:shared=False"'
- id: 'step-34'
uses: 'actions/upload-artifact@v3'
uses: 'actions/upload-artifact@v4'
with:
name: 'openssl-${{ inputs.version }}'
name: 'openssl-macos-${{ inputs.version }}'
path: |-
build/openssl3/*/lib/*
build/openssl3/*/dynamicLib/*
build/openssl3/*/staticLib/*
build/openssl3/*/include/*
if-no-files-found: 'error'
linux:
name: 'linux-${{ inputs.version }}'
runs-on: 'ubuntu-20.04'
steps:
- id: 'step-0'
Expand All @@ -114,66 +117,68 @@ jobs:
- id: 'step-5'
run: 'sudo apt install g++-8-aarch64-linux-gnu g++-8'
- id: 'step-6'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-arm64 -o "*:shared=False"'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-arm64 -o "*:shared=True"'
- id: 'step-7'
run: 'conan install packages/openssl3 --output-folder build/openssl3/android-arm64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-arm64 -o "*:shared=False"'
run: 'conan install packages/openssl3 --output-folder build/openssl3/android-arm64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-arm64 -o "*:shared=True"'
- id: 'step-8'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-arm64 -o "*:shared=True"'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-arm64 -o "*:shared=False"'
- id: 'step-9'
run: 'conan install packages/openssl3 --output-folder build/openssl3/android-arm64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-arm64 -o "*:shared=True"'
run: 'conan install packages/openssl3 --output-folder build/openssl3/android-arm64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-arm64 -o "*:shared=False"'
- id: 'step-10'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-arm32 -o "*:shared=False"'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-arm32 -o "*:shared=True"'
- id: 'step-11'
run: 'conan install packages/openssl3 --output-folder build/openssl3/android-arm32 --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-arm32 -o "*:shared=False"'
run: 'conan install packages/openssl3 --output-folder build/openssl3/android-arm32 --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-arm32 -o "*:shared=True"'
- id: 'step-12'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-arm32 -o "*:shared=True"'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-arm32 -o "*:shared=False"'
- id: 'step-13'
run: 'conan install packages/openssl3 --output-folder build/openssl3/android-arm32 --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-arm32 -o "*:shared=True"'
run: 'conan install packages/openssl3 --output-folder build/openssl3/android-arm32 --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-arm32 -o "*:shared=False"'
- id: 'step-14'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-x64 -o "*:shared=False"'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-x64 -o "*:shared=True"'
- id: 'step-15'
run: 'conan install packages/openssl3 --output-folder build/openssl3/android-x64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-x64 -o "*:shared=False"'
run: 'conan install packages/openssl3 --output-folder build/openssl3/android-x64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-x64 -o "*:shared=True"'
- id: 'step-16'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-x64 -o "*:shared=True"'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-x64 -o "*:shared=False"'
- id: 'step-17'
run: 'conan install packages/openssl3 --output-folder build/openssl3/android-x64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-x64 -o "*:shared=True"'
run: 'conan install packages/openssl3 --output-folder build/openssl3/android-x64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-x64 -o "*:shared=False"'
- id: 'step-18'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-x86 -o "*:shared=False"'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-x86 -o "*:shared=True"'
- id: 'step-19'
run: 'conan install packages/openssl3 --output-folder build/openssl3/android-x86 --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-x86 -o "*:shared=False"'
run: 'conan install packages/openssl3 --output-folder build/openssl3/android-x86 --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-x86 -o "*:shared=True"'
- id: 'step-20'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-x86 -o "*:shared=True"'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-x86 -o "*:shared=False"'
- id: 'step-21'
run: 'conan install packages/openssl3 --output-folder build/openssl3/android-x86 --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-x86 -o "*:shared=True"'
run: 'conan install packages/openssl3 --output-folder build/openssl3/android-x86 --version=${{ inputs.version }} -pr:b default -pr:h profiles/android-x86 -o "*:shared=False"'
- id: 'step-22'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/linux-x64 -o "*:shared=False"'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/linux-x64 -o "*:shared=True"'
- id: 'step-23'
run: 'conan install packages/openssl3 --output-folder build/openssl3/linux-x64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/linux-x64 -o "*:shared=False"'
run: 'conan install packages/openssl3 --output-folder build/openssl3/linux-x64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/linux-x64 -o "*:shared=True"'
- id: 'step-24'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/linux-x64 -o "*:shared=True"'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/linux-x64 -o "*:shared=False"'
- id: 'step-25'
run: 'conan install packages/openssl3 --output-folder build/openssl3/linux-x64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/linux-x64 -o "*:shared=True"'
run: 'conan install packages/openssl3 --output-folder build/openssl3/linux-x64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/linux-x64 -o "*:shared=False"'
- id: 'step-26'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/linux-arm64 -o "*:shared=False"'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/linux-arm64 -o "*:shared=True"'
- id: 'step-27'
run: 'conan install packages/openssl3 --output-folder build/openssl3/linux-arm64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/linux-arm64 -o "*:shared=False"'
run: 'conan install packages/openssl3 --output-folder build/openssl3/linux-arm64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/linux-arm64 -o "*:shared=True"'
- id: 'step-28'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/linux-arm64 -o "*:shared=True"'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/linux-arm64 -o "*:shared=False"'
- id: 'step-29'
run: 'conan install packages/openssl3 --output-folder build/openssl3/linux-arm64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/linux-arm64 -o "*:shared=True"'
run: 'conan install packages/openssl3 --output-folder build/openssl3/linux-arm64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/linux-arm64 -o "*:shared=False"'
- id: 'step-30'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/wasm -o "*:shared=False"'
- id: 'step-31'
run: 'conan install packages/openssl3 --output-folder build/openssl3/wasm --version=${{ inputs.version }} -pr:b default -pr:h profiles/wasm -o "*:shared=False"'
- id: 'step-32'
uses: 'actions/upload-artifact@v3'
uses: 'actions/upload-artifact@v4'
with:
name: 'openssl-${{ inputs.version }}'
name: 'openssl-linux-${{ inputs.version }}'
path: |-
build/openssl3/*/lib/*
build/openssl3/*/dynamicLib/*
build/openssl3/*/staticLib/*
build/openssl3/*/include/*
if-no-files-found: 'error'
windows:
name: 'windows-${{ inputs.version }}'
runs-on: 'windows-latest'
steps:
- id: 'step-0'
Expand All @@ -189,18 +194,38 @@ jobs:
- id: 'step-3'
run: 'conan profile detect'
- id: 'step-4'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/mingw-x64 -o "*:shared=False"'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/mingw-x64 -o "*:shared=True"'
- id: 'step-5'
run: 'conan install packages/openssl3 --output-folder build/openssl3/mingw-x64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/mingw-x64 -o "*:shared=False"'
run: 'conan install packages/openssl3 --output-folder build/openssl3/mingw-x64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/mingw-x64 -o "*:shared=True"'
- id: 'step-6'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/mingw-x64 -o "*:shared=True"'
run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=${{ inputs.version }} -pr:b default -pr:h profiles/mingw-x64 -o "*:shared=False"'
- id: 'step-7'
run: 'conan install packages/openssl3 --output-folder build/openssl3/mingw-x64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/mingw-x64 -o "*:shared=True"'
run: 'conan install packages/openssl3 --output-folder build/openssl3/mingw-x64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/mingw-x64 -o "*:shared=False"'
- id: 'step-8'
uses: 'actions/upload-artifact@v3'
uses: 'actions/upload-artifact@v4'
with:
name: 'openssl-${{ inputs.version }}'
name: 'openssl-windows-${{ inputs.version }}'
path: |-
build/openssl3/*/lib/*
build/openssl3/*/dynamicLib/*
build/openssl3/*/staticLib/*
build/openssl3/*/include/*
if-no-files-found: 'error'
aggregate:
runs-on: 'ubuntu-latest'
needs:
- 'macos'
- 'linux'
- 'windows'
steps:
- id: 'step-0'
uses: 'actions/download-artifact@v4'
with:
path: 'openssl'
pattern: 'openssl-*-${{ inputs.version }}'
merge-multiple: 'true'
- id: 'step-1'
uses: 'actions/upload-artifact@v4'
with:
name: 'openssl-${{ inputs.version }}'
path: 'openssl'
if-no-files-found: 'error'

0 comments on commit 7cb8b58

Please sign in to comment.