From dd0c7a746ede6164c0bcc40fb4f55dc42c821c50 Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Mon, 8 Jan 2024 23:17:23 +0200 Subject: [PATCH] test windows --- .github/workflows/build.main.kts | 98 +++++++------- .github/workflows/build.yaml | 215 +++---------------------------- profiles/windows-x64 | 5 + 3 files changed, 71 insertions(+), 247 deletions(-) create mode 100644 profiles/windows-x64 diff --git a/.github/workflows/build.main.kts b/.github/workflows/build.main.kts index ceeda0c..4e230ab 100755 --- a/.github/workflows/build.main.kts +++ b/.github/workflows/build.main.kts @@ -18,48 +18,49 @@ class Configuration( ) val configurations = listOf( - Configuration( - name = "macos", - runnerType = MacOSLatest, - profiles = listOf( - "tvos-simulator-arm64" to false, - "tvos-simulator-x64" to false, - "tvos-device-arm64" to false, - - "watchos-simulator-arm64" to false, - "watchos-simulator-x64" to false, - "watchos-device-arm32" to false, - "watchos-device-arm64" to false, - "watchos-device-arm64_32" to false, - - "ios-device-arm64" to false, - "ios-simulator-arm64" to false, - "ios-simulator-x64" to false, - - "macos-x64" to true, - "macos-arm64" to true, - ) - ), - Configuration( - name = "linux", - runnerType = Ubuntu2004, - profiles = listOf( - "android-arm64" to true, - "android-arm32" to true, - "android-x64" to true, - "android-x86" to true, - - "linux-x64" to true, - "linux-arm64" to true, - - "wasm" to false, - ) - ), +// Configuration( +// name = "macos", +// runnerType = MacOSLatest, +// profiles = listOf( +// "tvos-simulator-arm64" to false, +// "tvos-simulator-x64" to false, +// "tvos-device-arm64" to false, +// +// "watchos-simulator-arm64" to false, +// "watchos-simulator-x64" to false, +// "watchos-device-arm32" to false, +// "watchos-device-arm64" to false, +// "watchos-device-arm64_32" to false, +// +// "ios-device-arm64" to false, +// "ios-simulator-arm64" to false, +// "ios-simulator-x64" to false, +// +// "macos-x64" to true, +// "macos-arm64" to true, +// ) +// ), +// Configuration( +// name = "linux", +// runnerType = Ubuntu2004, +// profiles = listOf( +// "android-arm64" to true, +// "android-arm32" to true, +// "android-x64" to true, +// "android-x86" to true, +// +// "linux-x64" to true, +// "linux-arm64" to true, +// +// "wasm" to false, +// ) +// ), Configuration( name = "windows", runnerType = WindowsLatest, profiles = listOf( - "mingw-x64" to true +// "mingw-x64" to true, + "windows-x64" to true, ) ) ) @@ -86,15 +87,16 @@ fun conanCommand(profile: String, version: String, shared: String, command: Stri workflow( name = "Build", on = listOf( - WorkflowDispatch( - inputs = mapOf( - "version" to WorkflowDispatch.Input( - description = "version of OpenSSL 3", - required = true, - type = WorkflowDispatch.Type.String - ) - ) - ) + Push(), +// WorkflowDispatch( +// inputs = mapOf( +// "version" to WorkflowDispatch.Input( +// description = "version of OpenSSL 3", +// required = true, +// type = WorkflowDispatch.Type.String +// ) +// ) +// ) ), _customArguments = mapOf( "defaults" to mapOf( @@ -105,7 +107,7 @@ workflow( ), sourceFile = __FILE__.toPath(), ) { - val version = expr("inputs.version") + val version = "3.2.0"//expr("inputs.version") val jobs = configurations.map { configuration -> job( id = configuration.name, diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1466df5..70270ac 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,190 +4,13 @@ name: 'Build' on: - workflow_dispatch: - inputs: - version: - description: 'version of OpenSSL 3' - type: 'string' - required: true + push: {} defaults: run: shell: 'bash' jobs: - macos: - name: 'macos-${{ inputs.version }}' - runs-on: 'macos-latest' - steps: - - id: 'step-0' - uses: 'actions/checkout@v4' - with: - submodules: 'true' - - id: 'step-1' - uses: 'actions/setup-python@v5' - with: - python-version: '3.x' - - id: 'step-2' - run: 'pip install conan' - - 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/tvos-simulator-arm64 -o "*:shared=False"' - - id: 'step-5' - run: 'conan install packages/openssl3 --output-folder build/openssl3/tvos-simulator-arm64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/tvos-simulator-arm64 -o "*:shared=False"' - - 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/tvos-simulator-x64 -o "*:shared=False"' - - id: 'step-7' - run: 'conan install packages/openssl3 --output-folder build/openssl3/tvos-simulator-x64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/tvos-simulator-x64 -o "*:shared=False"' - - 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/tvos-device-arm64 -o "*:shared=False"' - - id: 'step-9' - run: 'conan install packages/openssl3 --output-folder build/openssl3/tvos-device-arm64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/tvos-device-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/watchos-simulator-arm64 -o "*:shared=False"' - - id: 'step-11' - run: 'conan install packages/openssl3 --output-folder build/openssl3/watchos-simulator-arm64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/watchos-simulator-arm64 -o "*:shared=False"' - - 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/watchos-simulator-x64 -o "*:shared=False"' - - id: 'step-13' - run: 'conan install packages/openssl3 --output-folder build/openssl3/watchos-simulator-x64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/watchos-simulator-x64 -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/watchos-device-arm32 -o "*:shared=False"' - - id: 'step-15' - run: 'conan install packages/openssl3 --output-folder build/openssl3/watchos-device-arm32 --version=${{ inputs.version }} -pr:b default -pr:h profiles/watchos-device-arm32 -o "*:shared=False"' - - 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/watchos-device-arm64 -o "*:shared=False"' - - id: 'step-17' - run: 'conan install packages/openssl3 --output-folder build/openssl3/watchos-device-arm64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/watchos-device-arm64 -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/watchos-device-arm64_32 -o "*:shared=False"' - - id: 'step-19' - run: 'conan install packages/openssl3 --output-folder build/openssl3/watchos-device-arm64_32 --version=${{ inputs.version }} -pr:b default -pr:h profiles/watchos-device-arm64_32 -o "*:shared=False"' - - 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/ios-device-arm64 -o "*:shared=False"' - - id: 'step-21' - run: 'conan install packages/openssl3 --output-folder build/openssl3/ios-device-arm64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/ios-device-arm64 -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/ios-simulator-arm64 -o "*:shared=False"' - - id: 'step-23' - run: 'conan install packages/openssl3 --output-folder build/openssl3/ios-simulator-arm64 --version=${{ inputs.version }} -pr:b default -pr:h profiles/ios-simulator-arm64 -o "*:shared=False"' - - 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/ios-simulator-x64 -o "*:shared=False"' - - 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=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=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=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=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=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=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=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=False"' - - id: 'step-34' - run: 'tar -rvf macos.tar build/openssl3/*/dynamicLib' - - id: 'step-35' - run: 'tar -rvf macos.tar build/openssl3/*/staticLib' - - id: 'step-36' - run: 'tar -rvf macos.tar build/openssl3/*/include' - - id: 'step-37' - uses: 'actions/upload-artifact@v4' - with: - name: 'openssl-macos-${{ inputs.version }}' - path: 'macos.tar' - if-no-files-found: 'error' - linux: - name: 'linux-${{ inputs.version }}' - runs-on: 'ubuntu-20.04' - steps: - - id: 'step-0' - uses: 'actions/checkout@v4' - with: - submodules: 'true' - - id: 'step-1' - uses: 'actions/setup-python@v5' - with: - python-version: '3.x' - - id: 'step-2' - run: 'pip install conan' - - id: 'step-3' - run: 'conan profile detect' - - id: 'step-4' - run: 'sudo apt update' - - 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=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=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=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=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=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=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=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=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=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=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=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=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=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=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=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=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=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=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=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=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=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=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=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=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' - run: 'tar -rvf linux.tar build/openssl3/*/dynamicLib' - - id: 'step-33' - run: 'tar -rvf linux.tar build/openssl3/*/staticLib' - - id: 'step-34' - run: 'tar -rvf linux.tar build/openssl3/*/include' - - id: 'step-35' - uses: 'actions/upload-artifact@v4' - with: - name: 'openssl-linux-${{ inputs.version }}' - path: 'linux.tar' - if-no-files-found: 'error' windows: - name: 'windows-${{ inputs.version }}' + name: 'windows-3.2.0' runs-on: 'windows-latest' steps: - id: 'step-0' @@ -203,13 +26,13 @@ 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=True"' + run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=3.2.0 -pr:b default -pr:h profiles/windows-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=True"' + run: 'conan install packages/openssl3 --output-folder build/openssl3/windows-x64 --version=3.2.0 -pr:b default -pr:h profiles/windows-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=False"' + run: 'conan create conan-center-index/recipes/openssl/3.x.x --build=missing --version=3.2.0 -pr:b default -pr:h profiles/windows-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=False"' + run: 'conan install packages/openssl3 --output-folder build/openssl3/windows-x64 --version=3.2.0 -pr:b default -pr:h profiles/windows-x64 -o "*:shared=False"' - id: 'step-8' run: 'tar -rvf windows.tar build/openssl3/*/dynamicLib' - id: 'step-9' @@ -219,38 +42,32 @@ jobs: - id: 'step-11' uses: 'actions/upload-artifact@v4' with: - name: 'openssl-windows-${{ inputs.version }}' + name: 'openssl-windows-3.2.0' path: 'windows.tar' if-no-files-found: 'error' aggregate: runs-on: 'ubuntu-latest' needs: - - 'macos' - - 'linux' - 'windows' steps: - id: 'step-0' uses: 'actions/download-artifact@v4' with: - pattern: 'openssl-*-${{ inputs.version }}' + pattern: 'openssl-*-3.2.0' merge-multiple: 'true' - id: 'step-1' - run: 'tar -xvf macos.tar' - - id: 'step-2' - run: 'tar -xvf linux.tar' - - id: 'step-3' run: 'tar -xvf windows.tar' - - id: 'step-4' + - id: 'step-2' working-directory: 'build/openssl3' - run: 'tar -czvf ../../openssl-${{ inputs.version }}.tar.gz *' - - id: 'step-5' + run: 'tar -czvf ../../openssl-3.2.0.tar.gz *' + - id: 'step-3' working-directory: 'build/openssl3' - run: 'zip --symlinks -r ../../openssl-${{ inputs.version }}.zip *' - - id: 'step-6' + run: 'zip --symlinks -r ../../openssl-3.2.0.zip *' + - id: 'step-4' uses: 'actions/upload-artifact@v4' with: - name: 'openssl-${{ inputs.version }}' + name: 'openssl-3.2.0' path: |- - openssl-${{ inputs.version }}.tar.gz - openssl-${{ inputs.version }}.zip + openssl-3.2.0.tar.gz + openssl-3.2.0.zip if-no-files-found: 'error' diff --git a/profiles/windows-x64 b/profiles/windows-x64 new file mode 100644 index 0000000..4b35c44 --- /dev/null +++ b/profiles/windows-x64 @@ -0,0 +1,5 @@ +include(base) +[settings] +os=Windows +arch=x86_64 +compiler=msvc \ No newline at end of file