mirror of
https://github.com/upa/mscp.git
synced 2026-05-13 22:07:29 +08:00
update github workflows to fit patched libssh
This commit is contained in:
19
.github/workflows/build-macos.yml
vendored
19
.github/workflows/build-macos.yml
vendored
@@ -19,18 +19,23 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
# libssh and cmake are already installed on the macos-latest runner, 2022/11/5
|
- name: install build dependency
|
||||||
# - name: install build dependency
|
run: ./scripts/install-build-deps.sh
|
||||||
#run: |
|
|
||||||
# brew update
|
- name: save homebrew prefix
|
||||||
# brew install libssh
|
id: brew-prefix
|
||||||
# brew install cmake
|
run: echo "HOMEBREW_PREFIX=$(brew --prefix)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: patch to libssh
|
||||||
|
run: patch -d libssh -p1 < patch/libssh-0.10.4.patch
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
||||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DOPENSSL_ROOT_DIR=${{steps.brew-prefix.outputs.HOMEBREW_PREFIX}}/opt/openssl@1.1
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
# Build your program with the given configuration
|
# Build your program with the given configuration
|
||||||
|
|||||||
6
.github/workflows/build-ubuntu.yml
vendored
6
.github/workflows/build-ubuntu.yml
vendored
@@ -19,9 +19,15 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
- name: install build dependency
|
- name: install build dependency
|
||||||
run: sudo ./scripts/install-build-deps.sh
|
run: sudo ./scripts/install-build-deps.sh
|
||||||
|
|
||||||
|
- name: patch to libssh
|
||||||
|
run: patch -d libssh -p1 < patch/libssh-0.10.4.patch
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
||||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||||
|
|||||||
25
.github/workflows/release.yml
vendored
25
.github/workflows/release.yml
vendored
@@ -13,21 +13,32 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: patch to libssh
|
||||||
|
run: patch -d libssh -p1 < patch/libssh-0.10.4.patch
|
||||||
|
|
||||||
|
# TODO: just building docker does not require libssh. fix CMakeLists
|
||||||
|
- name: install build dependency
|
||||||
|
run: sudo ./scripts/install-build-deps.sh
|
||||||
|
|
||||||
- name: Set variables
|
- name: Set variables
|
||||||
run: |
|
run: |
|
||||||
VER=$(cat VERSION)
|
VER=$(cat VERSION)
|
||||||
echo "VERSION=$VER" >> $GITHUB_ENV
|
echo "VERSION=$VER" >> $GITHUB_ENV
|
||||||
|
|
||||||
# TODO: docker build does not require libssh. fix CMakeLists
|
|
||||||
- name: install build dependency
|
|
||||||
run: sudo ./scripts/install-build-deps.sh
|
|
||||||
|
|
||||||
- name: Configure Cmake
|
- name: Configure Cmake
|
||||||
run: cmake -B ${{github.workspace}}/build -DBUILD_PKG=1 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||||
|
|
||||||
- name: Build Packages
|
- name: Build Containers
|
||||||
run: make -C ${{github.workspace}}/build package-all-in-docker
|
run: make -C ${{github.workspace}}/build docker-build-all
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: make -C ${{github.workspace}}/build docker-test-all
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: make -C ${{github.workspace}}/build docker-pkg-all
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
|
|||||||
25
.github/workflows/test.yml
vendored
25
.github/workflows/test.yml
vendored
@@ -14,12 +14,21 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Build ubuntu 22.04 container
|
with:
|
||||||
run: docker build --rm -t mscp-ubuntu:22.04 -f docker/ubuntu-22.04.Dockerfile .
|
submodules: true
|
||||||
- name: Run test on ubuntu 22.04
|
|
||||||
run: docker run --init --rm mscp-ubuntu:22.04 /mscp/scripts/test-in-container.sh
|
|
||||||
|
|
||||||
- name: Build centos 8 container
|
- name: patch to libssh
|
||||||
run: docker build --rm -t mscp-centos:8 -f docker/centos-8.Dockerfile .
|
run: patch -d libssh -p1 < patch/libssh-0.10.4.patch
|
||||||
- name: Run test on centos 8
|
|
||||||
run: docker run --init --rm mscp-centos:8 /mscp/scripts/test-in-container.sh
|
# TODO: just building docker does not require libssh. fix CMakeLists
|
||||||
|
- name: install build dependency
|
||||||
|
run: sudo ./scripts/install-build-deps.sh
|
||||||
|
|
||||||
|
- name: configure CMake
|
||||||
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||||
|
|
||||||
|
- name: Build Containers
|
||||||
|
run: make -C ${{github.workspace}}/build docker-build-all
|
||||||
|
|
||||||
|
- name: Run Test
|
||||||
|
run: make -C ${{github.workspace}}/build docker-test-all
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ set -x
|
|||||||
|
|
||||||
case $platform in
|
case $platform in
|
||||||
Darwin)
|
Darwin)
|
||||||
brew install openssl
|
brew install openssl@1.1
|
||||||
;;
|
;;
|
||||||
Linux-ubuntu*)
|
Linux-ubuntu*)
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
|
|||||||
Reference in New Issue
Block a user