|
23 | 23 | strategy:
|
24 | 24 | matrix:
|
25 | 25 | include:
|
26 |
| - - os: ubuntu-latest |
27 |
| - classifier: linux-x86_64 |
28 |
| - java: 8 |
29 |
| - root-pom: 'pom.xml' |
30 | 26 | - os: ubuntu-latest
|
31 | 27 | classifier: linux-aarch_64
|
32 | 28 | java: 8
|
@@ -93,12 +89,77 @@ jobs:
|
93 | 89 | path: |
|
94 | 90 | java/target/classes/native
|
95 | 91 |
|
| 92 | + build-on-centos: |
| 93 | + name: Build on CentOS 7 |
| 94 | + runs-on: ubuntu-latest |
| 95 | + container: |
| 96 | + image: "centos:7" |
| 97 | + |
| 98 | + steps: |
| 99 | + - name: Checkout |
| 100 | + uses: actions/checkout@v3 |
| 101 | + |
| 102 | + - name: Test and Build |
| 103 | + run: | |
| 104 | + yum makecache |
| 105 | + yum install -y centos-release-scl-rh centos-release-scl |
| 106 | + yum install -y devtoolset-10-gcc devtoolset-10-gcc-c++ devtoolset-10-make |
| 107 | + yum install -y wget |
| 108 | + yum install -y epel-release |
| 109 | + yum install -y llvm clang llvm-devel |
| 110 | + yum install -y gcc |
| 111 | + source /opt/rh/devtoolset-10/enable |
| 112 | + gcc --version |
| 113 | + cat /etc/os-release |
| 114 | +
|
| 115 | + - name: Install Python 3 |
| 116 | + run: | |
| 117 | + yum install -y python3 python3-devel python3-pip |
| 118 | + |
| 119 | + - name: Install Rust |
| 120 | + run: | |
| 121 | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y |
| 122 | + mv $HOME/.cargo/bin/* /usr/bin/ |
| 123 | + rustc --version |
| 124 | + cargo --version |
| 125 | +
|
| 126 | + - name: Install Java and Maven |
| 127 | + run: | |
| 128 | + yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel |
| 129 | + wget https://repo.huaweicloud.com/apache/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz |
| 130 | + tar -xzf apache-maven-*.tar.gz |
| 131 | + mkdir p /opt/maven |
| 132 | + mv apache-maven-* /opt/maven |
| 133 | + ln -s /opt/maven/apache-maven-3.9.6/bin/mvn /usr/bin/mvn |
| 134 | + mvn --version |
| 135 | +
|
| 136 | + - name: Verify installed versions |
| 137 | + run: | |
| 138 | + gcc --version |
| 139 | + llvm-config --version |
| 140 | + python3 --version |
| 141 | + rustc --version |
| 142 | + mvn --version |
| 143 | + cat /etc/os-release |
| 144 | +
|
| 145 | + - name: 'Build and Deploy' |
| 146 | + shell: bash |
| 147 | + working-directory: java |
| 148 | + run: mvn clean package -DskipTests=true -Djni.classifier=linux-x86_64 -Dcargo-build.profile=release |
| 149 | + |
| 150 | + - name: 'Upload artifact' |
| 151 | + uses: actions/upload-artifact@v3 |
| 152 | + with: |
| 153 | + name: kcl-lib-linux-x86_64 |
| 154 | + path: java/target/classes/native |
| 155 | + |
| 156 | + |
96 | 157 | deploy:
|
97 | 158 | runs-on: ubuntu-latest
|
98 | 159 | permissions:
|
99 | 160 | contents: read
|
100 | 161 | packages: write
|
101 |
| - needs: [ test ] |
| 162 | + needs: [ test, build-on-centos ] |
102 | 163 | steps:
|
103 | 164 | - uses: actions/checkout@v4
|
104 | 165 |
|
|
0 commit comments