summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorRyo Nakamura <upa@haeena.net>2022-11-24 22:59:59 +0900
committerRyo Nakamura <upa@haeena.net>2022-11-24 22:59:59 +0900
commitb46a6f15c1548121747dfafdf9cec9130944be4b (patch)
tree18545d6ad04afbabdd83fe473aceb952a48241aa /.github
parent6f9aaeab80e601b45b60bd1ca78f5e8fd2f49605 (diff)
update github workflows to fit patched libssh
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build-macos.yml19
-rw-r--r--.github/workflows/build-ubuntu.yml6
-rw-r--r--.github/workflows/release.yml25
-rw-r--r--.github/workflows/test.yml27
4 files changed, 54 insertions, 23 deletions
diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml
index eda49af..a3cd55a 100644
--- a/.github/workflows/build-macos.yml
+++ b/.github/workflows/build-macos.yml
@@ -19,18 +19,23 @@ jobs:
steps:
- 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
- #run: |
- # brew update
- # brew install libssh
- # brew install cmake
+ - name: install build dependency
+ run: ./scripts/install-build-deps.sh
+
+ - name: save homebrew prefix
+ id: brew-prefix
+ 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
# 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
- 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
# Build your program with the given configuration
diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml
index 4fae437..b2c703f 100644
--- a/.github/workflows/build-ubuntu.yml
+++ b/.github/workflows/build-ubuntu.yml
@@ -19,9 +19,15 @@ jobs:
steps:
- uses: actions/checkout@v3
+ with:
+ submodules: true
+
- name: install build dependency
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
# 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
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index fdcc97d..5523348 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -13,21 +13,32 @@ jobs:
runs-on: ubuntu-latest
steps:
- 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
run: |
VER=$(cat VERSION)
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
- 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 Containers
+ run: make -C ${{github.workspace}}/build docker-build-all
+
+ - name: Test
+ run: make -C ${{github.workspace}}/build docker-test-all
- - name: Build Packages
- run: make -C ${{github.workspace}}/build package-all-in-docker
+ - name: Test
+ run: make -C ${{github.workspace}}/build docker-pkg-all
- name: Release
uses: softprops/action-gh-release@v1
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index a4c1909..9c9e459 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -14,12 +14,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- - name: Build ubuntu 22.04 container
- run: docker build --rm -t mscp-ubuntu:22.04 -f docker/ubuntu-22.04.Dockerfile .
- - 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
- run: docker build --rm -t mscp-centos:8 -f docker/centos-8.Dockerfile .
- - name: Run test on centos 8
- run: docker run --init --rm mscp-centos:8 /mscp/scripts/test-in-container.sh
+ 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: 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