From 5a226227314f98ddcb13204fdd285359d8fbb526 Mon Sep 17 00:00:00 2001 From: mio Date: Mon, 5 May 2025 21:18:05 +0800 Subject: [PATCH 1/9] s390x ci --- .github/workflows/build-uc2.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/build-uc2.yml b/.github/workflows/build-uc2.yml index d2dff10560..d413285e66 100644 --- a/.github/workflows/build-uc2.yml +++ b/.github/workflows/build-uc2.yml @@ -443,6 +443,15 @@ jobs: generators: 'Ninja', distro: ubuntu22.04 } + - { + os: ubuntu-22.04, + arch: x86, + name: 'ubuntu-s390x cmake', + artifact: 'ubuntu-cmake-s390x.7z', + archiver: '7z a', + generators: 'Ninja', + distro: ubuntu22.04 + } compiler: [ gcc ] steps: - uses: actions/checkout@v4 @@ -517,6 +526,23 @@ jobs: cmake --install . --strip ctest -VV -C ${{ env.BUILD_TYPE }} + - name: '🚧 Linux s390x build' + if: contains(matrix.config.arch, 's390x') + uses: appleboy/ssh-action@v1 + with: + host: ${{ secrets.S390X_HOST }} + username: ${{ secrets.S390X_USERNAME }} + key: ${{ secrets.S390X_PRIVKEY }} + port: ${{ secrets.S390X_PORT }} + envs: + GITHUB_SHA: ${{ github.sha }} + GITHUB_REPO: ${{ github.repositoryUrl }} + script: | + git clone $GITHUB_REPO repo && cd repo && git checkout $GITHUB_SHA &&\ + mkdir build install && cd build && cmake .. -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ + -DCMAKE_INSTALL_PREFIX:PATH=install && cmake --build . --config ${{ env.BUILD_TYPE }} -j 4 && \ + ctest -VV -C ${{ env.BUILD_TYPE }} && cmake --install . --strip + - name: '📦 Pack artifact' if: always() shell: bash From 6d96beeb292dbc047b2ba3050ca8c2176c0a22f4 Mon Sep 17 00:00:00 2001 From: mio Date: Mon, 5 May 2025 21:20:11 +0800 Subject: [PATCH 2/9] fix envs --- .github/workflows/build-uc2.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-uc2.yml b/.github/workflows/build-uc2.yml index d413285e66..e9a32fba1c 100644 --- a/.github/workflows/build-uc2.yml +++ b/.github/workflows/build-uc2.yml @@ -529,14 +529,15 @@ jobs: - name: '🚧 Linux s390x build' if: contains(matrix.config.arch, 's390x') uses: appleboy/ssh-action@v1 + env: + GITHUB_SHA: ${{ github.sha }} + GITHUB_REPO: ${{ github.repositoryUrl }} with: host: ${{ secrets.S390X_HOST }} username: ${{ secrets.S390X_USERNAME }} key: ${{ secrets.S390X_PRIVKEY }} port: ${{ secrets.S390X_PORT }} - envs: - GITHUB_SHA: ${{ github.sha }} - GITHUB_REPO: ${{ github.repositoryUrl }} + envs: GITHUB_SHA,GITHUB_REPO script: | git clone $GITHUB_REPO repo && cd repo && git checkout $GITHUB_SHA &&\ mkdir build install && cd build && cmake .. -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ From a90f0677fc568d9b6b653bc3ab12f8ffd54b8f70 Mon Sep 17 00:00:00 2001 From: mio Date: Mon, 5 May 2025 21:42:13 +0800 Subject: [PATCH 3/9] fix artifacts and minors --- .github/workflows/build-uc2.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-uc2.yml b/.github/workflows/build-uc2.yml index e9a32fba1c..522caf0852 100644 --- a/.github/workflows/build-uc2.yml +++ b/.github/workflows/build-uc2.yml @@ -445,10 +445,10 @@ jobs: } - { os: ubuntu-22.04, - arch: x86, + arch: s390x, name: 'ubuntu-s390x cmake', artifact: 'ubuntu-cmake-s390x.7z', - archiver: '7z a', + archiver: '7za a', generators: 'Ninja', distro: ubuntu22.04 } @@ -543,7 +543,18 @@ jobs: mkdir build install && cd build && cmake .. -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ -DCMAKE_INSTALL_PREFIX:PATH=install && cmake --build . --config ${{ env.BUILD_TYPE }} -j 4 && \ ctest -VV -C ${{ env.BUILD_TYPE }} && cmake --install . --strip - + + - name: '🚧 Linux s390x fetch artifacts' + if: contains(matrix.config.arch, 's390x') + uses: appleboy/scp-action@v1 + with: + host: ${{ secrets.S390X_HOST }} + username: ${{ secrets.S390X_USERNAME }} + key: ${{ secrets.S390X_PRIVKEY }} + port: ${{ secrets.S390X_PORT }} + source: "/work/repo/build" + target: /instdir + - name: '📦 Pack artifact' if: always() shell: bash From 078aabeb081eecb488bc43a0e458f724fba3745e Mon Sep 17 00:00:00 2001 From: mio Date: Mon, 5 May 2025 21:43:43 +0800 Subject: [PATCH 4/9] remove previous builds anyway --- .github/workflows/build-uc2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-uc2.yml b/.github/workflows/build-uc2.yml index 522caf0852..6235f94ee0 100644 --- a/.github/workflows/build-uc2.yml +++ b/.github/workflows/build-uc2.yml @@ -539,7 +539,7 @@ jobs: port: ${{ secrets.S390X_PORT }} envs: GITHUB_SHA,GITHUB_REPO script: | - git clone $GITHUB_REPO repo && cd repo && git checkout $GITHUB_SHA &&\ + rm -rf /work/repo && git clone $GITHUB_REPO repo && cd repo && git checkout $GITHUB_SHA &&\ mkdir build install && cd build && cmake .. -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ -DCMAKE_INSTALL_PREFIX:PATH=install && cmake --build . --config ${{ env.BUILD_TYPE }} -j 4 && \ ctest -VV -C ${{ env.BUILD_TYPE }} && cmake --install . --strip From dac5cdf6629f0bfa812c59cc81467456c584270c Mon Sep 17 00:00:00 2001 From: mio Date: Tue, 6 May 2025 11:01:59 +0800 Subject: [PATCH 5/9] update folder --- .github/workflows/build-uc2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-uc2.yml b/.github/workflows/build-uc2.yml index 6235f94ee0..894d286b71 100644 --- a/.github/workflows/build-uc2.yml +++ b/.github/workflows/build-uc2.yml @@ -552,7 +552,7 @@ jobs: username: ${{ secrets.S390X_USERNAME }} key: ${{ secrets.S390X_PRIVKEY }} port: ${{ secrets.S390X_PORT }} - source: "/work/repo/build" + source: "/work/repo/install" target: /instdir - name: '📦 Pack artifact' From 8ca3bf6ee8fa0cc5965da298e3112b6d9d6ab162 Mon Sep 17 00:00:00 2001 From: mio Date: Tue, 6 May 2025 13:51:13 +0800 Subject: [PATCH 6/9] fix github repo --- .github/workflows/build-uc2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-uc2.yml b/.github/workflows/build-uc2.yml index 894d286b71..47a216d3db 100644 --- a/.github/workflows/build-uc2.yml +++ b/.github/workflows/build-uc2.yml @@ -531,7 +531,7 @@ jobs: uses: appleboy/ssh-action@v1 env: GITHUB_SHA: ${{ github.sha }} - GITHUB_REPO: ${{ github.repositoryUrl }} + GITHUB_REPO: ${{ github.repository }} with: host: ${{ secrets.S390X_HOST }} username: ${{ secrets.S390X_USERNAME }} @@ -539,7 +539,7 @@ jobs: port: ${{ secrets.S390X_PORT }} envs: GITHUB_SHA,GITHUB_REPO script: | - rm -rf /work/repo && git clone $GITHUB_REPO repo && cd repo && git checkout $GITHUB_SHA &&\ + rm -rf /work/repo && git clone https://github.com/$GITHUB_REPO repo && cd repo && git checkout $GITHUB_SHA &&\ mkdir build install && cd build && cmake .. -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ -DCMAKE_INSTALL_PREFIX:PATH=install && cmake --build . --config ${{ env.BUILD_TYPE }} -j 4 && \ ctest -VV -C ${{ env.BUILD_TYPE }} && cmake --install . --strip From 26f291f89e4a66a4b2e22b74f740f307581d3b4b Mon Sep 17 00:00:00 2001 From: mio Date: Tue, 6 May 2025 14:38:25 +0800 Subject: [PATCH 7/9] bash -c --- .github/workflows/build-uc2.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-uc2.yml b/.github/workflows/build-uc2.yml index 47a216d3db..b7948814a3 100644 --- a/.github/workflows/build-uc2.yml +++ b/.github/workflows/build-uc2.yml @@ -532,17 +532,18 @@ jobs: env: GITHUB_SHA: ${{ github.sha }} GITHUB_REPO: ${{ github.repository }} + BUILT_TYPE: ${{ env.BUILD_TYPE }} with: host: ${{ secrets.S390X_HOST }} username: ${{ secrets.S390X_USERNAME }} key: ${{ secrets.S390X_PRIVKEY }} port: ${{ secrets.S390X_PORT }} - envs: GITHUB_SHA,GITHUB_REPO + envs: GITHUB_SHA,GITHUB_REPO,BUILT_TYPE script: | - rm -rf /work/repo && git clone https://github.com/$GITHUB_REPO repo && cd repo && git checkout $GITHUB_SHA &&\ - mkdir build install && cd build && cmake .. -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ - -DCMAKE_INSTALL_PREFIX:PATH=install && cmake --build . --config ${{ env.BUILD_TYPE }} -j 4 && \ - ctest -VV -C ${{ env.BUILD_TYPE }} && cmake --install . --strip + bash -c "rm -rf /work/repo && git clone https://github.com/$GITHUB_REPO repo && cd repo && git checkout $GITHUB_SHA &&\ + mkdir build install && cd build && cmake .. -DCMAKE_BUILD_TYPE=$BUILT_TYPE \ + -DCMAKE_INSTALL_PREFIX:PATH=install && cmake --build . --config $BUILT_TYPE -j 4 && \ + ctest -VV -C $BUILT_TYPE && cmake --install . --strip" - name: '🚧 Linux s390x fetch artifacts' if: contains(matrix.config.arch, 's390x') From b3d985b99573936d97fccc03fee67ef5c8f2b807 Mon Sep 17 00:00:00 2001 From: mio Date: Tue, 6 May 2025 14:50:26 +0800 Subject: [PATCH 8/9] cd /work firstly --- .github/workflows/build-uc2.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-uc2.yml b/.github/workflows/build-uc2.yml index b7948814a3..edbc047af2 100644 --- a/.github/workflows/build-uc2.yml +++ b/.github/workflows/build-uc2.yml @@ -540,7 +540,8 @@ jobs: port: ${{ secrets.S390X_PORT }} envs: GITHUB_SHA,GITHUB_REPO,BUILT_TYPE script: | - bash -c "rm -rf /work/repo && git clone https://github.com/$GITHUB_REPO repo && cd repo && git checkout $GITHUB_SHA &&\ + bash -c "cd /work && rm -rf repo &&\ + git clone https://github.com/$GITHUB_REPO repo && cd repo && git checkout $GITHUB_SHA &&\ mkdir build install && cd build && cmake .. -DCMAKE_BUILD_TYPE=$BUILT_TYPE \ -DCMAKE_INSTALL_PREFIX:PATH=install && cmake --build . --config $BUILT_TYPE -j 4 && \ ctest -VV -C $BUILT_TYPE && cmake --install . --strip" From 61ddc8858d36c61f9e3f2dc1ed064052106f1b3b Mon Sep 17 00:00:00 2001 From: mio Date: Tue, 6 May 2025 16:02:30 +0800 Subject: [PATCH 9/9] pwd --- .github/workflows/build-uc2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-uc2.yml b/.github/workflows/build-uc2.yml index edbc047af2..71f3ef4dfe 100644 --- a/.github/workflows/build-uc2.yml +++ b/.github/workflows/build-uc2.yml @@ -540,7 +540,7 @@ jobs: port: ${{ secrets.S390X_PORT }} envs: GITHUB_SHA,GITHUB_REPO,BUILT_TYPE script: | - bash -c "cd /work && rm -rf repo &&\ + bash -c "cd /work && rm -rf repo && pwd &&\ git clone https://github.com/$GITHUB_REPO repo && cd repo && git checkout $GITHUB_SHA &&\ mkdir build install && cd build && cmake .. -DCMAKE_BUILD_TYPE=$BUILT_TYPE \ -DCMAKE_INSTALL_PREFIX:PATH=install && cmake --build . --config $BUILT_TYPE -j 4 && \