mirror of
https://github.com/facebook/sapling.git
synced 2024-09-11 18:47:10 +03:00
Summary: This diff fixed the openssl compile errror by setting the env variables ``` error: failed to run custom build command for `openssl-sys v0.9.95` Caused by: process didn't exit successfully: `D:\a\sapling\sapling\eden\scm\build\cargo-target\release\build\openssl-sys-dbaf6a9d88c8a4e6\build-script-main` (exit code: 101) --- stdout cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR unset cargo:rerun-if-env-changed=OPENSSL_LIB_DIR OPENSSL_LIB_DIR unset cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR unset cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR OPENSSL_INCLUDE_DIR unset cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_DIR X86_64_PC_WINDOWS_MSVC_OPENSSL_DIR unset cargo:rerun-if-env-changed=OPENSSL_DIR OPENSSL_DIR unset note: vcpkg did not find openssl: Could not look up details of packages in vcpkg tree could not read status file updates dir: The system cannot find the path specified. (os error 3) ``` Reviewed By: muirdm Differential Revision: D51115009 fbshipit-source-id: d021991de1c80099a5f2ae12fe486ec49b7fb318
68 lines
2.3 KiB
YAML
68 lines
2.3 KiB
YAML
name: Release - Windows amd64
|
|
'on':
|
|
workflow_dispatch: null
|
|
push:
|
|
tags:
|
|
- v*
|
|
- test-release-*
|
|
jobs:
|
|
build:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v3
|
|
- name: Grant Access
|
|
run: git config --global --add safe.directory "$PWD"
|
|
- name: rustup
|
|
run: rustup default stable
|
|
- name: Support longpaths
|
|
run: git config --system core.longpaths true
|
|
- name: openssl
|
|
run: vcpkg install openssl:x64-windows-static-md
|
|
- name: integrate vcpkg
|
|
run: vcpkg integrate install
|
|
- name: set-env SAPLING_VERSION
|
|
shell: bash
|
|
run: echo "SAPLING_VERSION=$(ci/tag-name.sh)" >> $GITHUB_ENV
|
|
- name: set-env OPENSSL_DIR
|
|
shell: bash
|
|
run: echo "OPENSSL_DIR=C:/vcpkg/packages/openssl_x64-windows-static-md" >> $GITHUB_ENV
|
|
- name: set-env OPENSSL_LIB_DIR
|
|
shell: bash
|
|
run: echo "OPENSSL_LIB_DIR=C:/vcpkg/packages/openssl_x64-windows-static-md/lib" >> $GITHUB_ENV
|
|
- name: set-env OPENSSL_INCLUDE_DIR
|
|
shell: bash
|
|
run: echo "OPENSSL_INCLUDE_DIR=C:/vcpkg/packages/openssl_x64-windows-static-md/include" >> $GITHUB_ENV
|
|
- name: build and zip
|
|
run: python3 ./eden/scm/packaging/windows/build_windows_zip.py
|
|
- name: rename .zip
|
|
working-directory: ./eden/scm/artifacts
|
|
run: ${{ format('Rename-Item sapling_windows_amd64.zip -NewName sapling_windows_{0}_amd64.zip', env.SAPLING_VERSION) }}
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: windows-amd64
|
|
path: ./eden/scm/artifacts/sapling_windows_*.zip
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v3
|
|
- name: Grant Access
|
|
run: git config --global --add safe.directory "$PWD"
|
|
- name: Download Artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: windows-amd64
|
|
- name: Create pre-release
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
shell: bash
|
|
run: bash ci/retry.sh bash ci/create-release.sh $(ci/tag-name.sh)
|
|
- name: Upload Release
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
shell: bash
|
|
run: bash ci/retry.sh gh release upload --clobber $(ci/tag-name.sh) sapling_windows_*.zip
|