From 5d0e772e31789edf672bbf548d3ba773351d1722 Mon Sep 17 00:00:00 2001 From: bab2min Date: Mon, 16 Sep 2024 00:36:15 +0900 Subject: [PATCH] Remove centos5,6 from CI/CD --- .github/workflows/centos5.yml | 51 --------- .../workflows/{centos6.yml => centos7.yml} | 21 ++-- .github/workflows/release.yml | 103 ++---------------- 3 files changed, 17 insertions(+), 158 deletions(-) delete mode 100644 .github/workflows/centos5.yml rename .github/workflows/{centos6.yml => centos7.yml} (66%) diff --git a/.github/workflows/centos5.yml b/.github/workflows/centos5.yml deleted file mode 100644 index 874dc64f..00000000 --- a/.github/workflows/centos5.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Centos5 - -on: - pull_request: - branches: [ main ] - -jobs: - build-centos: - name: Centos5 - runs-on: ubuntu-latest - container: - image: docker://hoshizora/manylinux1-clang_x86_64 - - steps: - - name: Install Git LFS - run: | - mkdir ../gitlfs && pushd ../gitlfs - curl -L https://github.com/git-lfs/git-lfs/releases/download/v2.13.2/git-lfs-linux-amd64-v2.13.2.tar.gz | tar -zxv - ./install.sh - popd - - uses: actions/checkout@v1 - with: - submodules: true - - name: Pull LFS files - run: git lfs pull - - name: Update CMake - run: /opt/python/cp36-cp36m/bin/pip install "cmake<3.20" - - name: Checkout Old Version googletest - run: cd third_party/googletest && git checkout v1.8.x && cd ../.. - - name: Configure Build - run: mkdir build && cd build && /opt/python/cp36-cp36m/bin/cmake -DCMAKE_BUILD_TYPE=Release -DKIWI_USE_MIMALLOC=0 -DKIWI_USE_CPUINFO=0 .. - - name: Build - run: cd build && make -j2 - - name: Run Unit Test - run: ./build/test/kiwi-test - - name: Run Unit Test in Debug mode - if: failure() - run: | - mkdir build_debug && cd build_debug && /opt/python/cp36-cp36m/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DKIWI_USE_MIMALLOC=0 -DKIWI_USE_CPUINFO=0 .. && make -j2 - cd .. && gdb -ex run -ex bt ./build_debug/test/kiwi-test - - name: Run Evaluator - run: | - mkdir eval_results - ./build/kiwi-evaluator -m ./ModelGenerator eval_data/*.txt -o eval_results/ - ./build/kiwi-evaluator -m ./ModelGenerator eval_data/*.txt --sbg -o eval_results/ - - run: tar -zcvf arts.tgz build/*kiwi* build/test/*kiwi* eval_results/*.txt - - name: Archive binaries - uses: actions/upload-artifact@v4 - with: - name: Artifacts Centos5 - path: arts.tgz diff --git a/.github/workflows/centos6.yml b/.github/workflows/centos7.yml similarity index 66% rename from .github/workflows/centos6.yml rename to .github/workflows/centos7.yml index f55cc19d..4c00da2f 100644 --- a/.github/workflows/centos6.yml +++ b/.github/workflows/centos7.yml @@ -6,29 +6,22 @@ on: jobs: build-centos6: - name: Centos6 + name: Centos7 runs-on: ubuntu-latest container: - image: docker://quay.io/pypa/manylinux2010_x86_64 + image: docker://quay.io/pypa/manylinux2014_x86_64 steps: - - name: Install Git LFS - run: | - mkdir ../gitlfs && pushd ../gitlfs - curl -L https://github.com/git-lfs/git-lfs/releases/download/v2.10.0/git-lfs-linux-amd64-v2.10.0.tar.gz | tar -zxv - ./install.sh - popd - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 with: submodules: true - - name: Pull LFS files - run: git config --global --add safe.directory /__w/Kiwi/Kiwi && git lfs pull + lfs: true - name: Update CMake run: | - /opt/python/cp36-cp36m/bin/pip install cmake + /opt/python/cp310-cp310/bin/pip install cmake yum install java-1.8.0-openjdk-devel.x86_64 -y - name: Configure Build - run: mkdir build && cd build && /opt/python/cp36-cp36m/bin/cmake -DCMAKE_BUILD_TYPE=Release -DKIWI_JAVA_BINDING=1 .. + run: mkdir build && cd build && /opt/python/cp310-cp310/bin/cmake -DCMAKE_BUILD_TYPE=Release -DKIWI_JAVA_BINDING=1 .. - name: Build run: cd build && make -j2 - name: Run Unit Test @@ -49,5 +42,5 @@ jobs: - name: Archive binaries uses: actions/upload-artifact@v4 with: - name: Artifacts Centos6 + name: Artifacts Centos7 path: arts.tgz diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 12ea553d..8663607f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,80 +5,27 @@ on: types: [created] jobs: - build-centos: - name: Centos5 + build-centos7: + name: Centos7 runs-on: ubuntu-latest container: - image: docker://hoshizora/manylinux1-clang_x86_64 + image: docker://quay.io/pypa/manylinux2014_x86_64 steps: - uses: actions/checkout@v1 with: submodules: true - - name: Checkout Old Version googletest - run: cd third_party/googletest && git checkout v1.8.x && cd ../.. - - name: Update CMake - run: /opt/python/cp36-cp36m/bin/pip install "cmake<3.20" - - name: Configure Build - run: mkdir build && cd build && /opt/python/cp36-cp36m/bin/cmake -DCMAKE_BUILD_TYPE=Release -DKIWI_USE_MIMALLOC=0 -DKIWI_USE_CPUINFO=0 .. - - name: Build - run: cd build && make -j2 - - run: | - mkdir result - cd result - mkdir include && mkdir lib && mkdir bin - mv ../build/libkiwi* lib/ - mv ../build/kiwi-* bin/ - mv ../build/test/kiwi-* bin/ - cp -r ../include/kiwi include/ - tar -zcvf ../asset.tgz include/ lib/ bin/ - - name: Archive binaries - uses: actions/upload-artifact@v4 - with: - name: asset_Centos5 - path: asset.tgz - - upload-asset-from-centos: - name: Upload asset from Centos5 - needs: build-centos - runs-on: ubuntu-latest - - steps: - - uses: actions/download-artifact@v4 - with: - name: asset_Centos5 - path: arts - name: Get release id: get_release - uses: bruceadams/get-release@v1.2.2 - env: - GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} - - name: Upload release binary - uses: actions/upload-release-asset@v1.0.2 + uses: bruceadams/get-release@v1.3.2 env: GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} - with: - upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: arts/asset.tgz - asset_name: kiwi_lnx_centos5_x86_64_${{ steps.get_release.outputs.tag_name }}.tgz - asset_content_type: application/octet-stream - - build-centos6: - name: Centos6 - runs-on: ubuntu-latest - container: - image: docker://quay.io/pypa/manylinux2010_x86_64 - - steps: - - uses: actions/checkout@v1 - with: - submodules: true - name: Update CMake run: | - /opt/python/cp36-cp36m/bin/pip install cmake + /opt/python/cp310-cp310/bin/pip install cmake yum install java-1.8.0-openjdk-devel.x86_64 -y - name: Configure Build - run: mkdir build && cd build && /opt/python/cp36-cp36m/bin/cmake -DCMAKE_BUILD_TYPE=Release -DKIWI_JAVA_BINDING=1 .. + run: mkdir build && cd build && /opt/python/cp310-cp310/bin/cmake -DCMAKE_BUILD_TYPE=Release -DKIWI_JAVA_BINDING=1 .. - name: Build run: cd build && make -j2 - run: | @@ -90,54 +37,24 @@ jobs: mv ../build/test/kiwi-* bin/ cp -r ../include/kiwi include/ tar -zcvf ../asset.tgz include/ lib/ bin/ - - name: Archive binaries - uses: actions/upload-artifact@v4 - with: - name: asset_Centos6 - path: asset.tgz - - run: | - mv build/bindings/java/kiwi-java*.jar kiwi-java.jar - - name: Archive jar binaries - uses: actions/upload-artifact@v4 - with: - name: jar_Centos6 - path: kiwi-java.jar - - upload-asset-from-centos6: - name: Upload asset from Centos6 - needs: build-centos6 - runs-on: ubuntu-latest - - steps: - - name: Get release - id: get_release - uses: bruceadams/get-release@v1.2.2 - env: - GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} - - uses: actions/download-artifact@v4 - with: - name: asset_Centos6 - path: arts - name: Upload release binary uses: actions/upload-release-asset@v1.0.2 env: GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} with: upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: arts/asset.tgz + asset_path: asset.tgz asset_name: kiwi_lnx_x86_64_${{ steps.get_release.outputs.tag_name }}.tgz asset_content_type: application/octet-stream - - uses: actions/download-artifact@v4 - with: - name: jar_Centos6 - path: arts + - run: | + mv build/bindings/java/kiwi-java*.jar kiwi-java.jar - name: Upload release jar uses: actions/upload-release-asset@v1.0.2 env: GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} with: upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: arts/kiwi-java.jar + asset_path: kiwi-java.jar asset_name: kiwi-java-${{ steps.get_release.outputs.tag_name }}-lnx-x86-64.jar asset_content_type: application/octet-stream