Skip to content

Commit 1983138

Browse files
authored
Merge pull request #1025 from eclipse/ag_enable_workflows
Add actions
2 parents 0d6606d + 075bcd7 commit 1983138

File tree

9 files changed

+207
-0
lines changed

9 files changed

+207
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Download dl4j test resources
2+
runs:
3+
using: composite
4+
steps:
5+
- name: Initial install
6+
shell: bash
7+
run: |
8+
wget https://github.com/KonduitAI/dl4j-test-resources/archive/master.zip && unzip master.zip
9+
cd dl4j-test-resources-master
10+
mvn clean install -DskipTests
11+
echo "Extracted test resources"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Download dl4j test resources
2+
runs:
3+
using: composite
4+
steps:
5+
- name: Initial install
6+
shell: cmd
7+
run: |
8+
set "PATH=C:\msys64\usr\bin;%PATH%"
9+
wget https://github.com/KonduitAI/dl4j-test-resources/archive/master.zip && unzip master.zip
10+
cd dl4j-test-resources-master
11+
mvn clean install -DskipTests
12+
echo "Extracted test resources"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Download dl4j test resources
2+
runs:
3+
using: composite
4+
steps:
5+
- name: Initial install
6+
shell: bash
7+
run: |
8+
sudo apt install git gcc-8-aarch64-linux-gnu g++-8-aarch64-linux-gnu libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev build-essential bison flex libssl-dev bc \
9+
gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf crossbuild-essential-arm64
10+
mkdir -p /opt/raspberrypi && \
11+
cd /opt/raspberrypi && \
12+
git clone git://github.com/raspberrypi/tools.git
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Install protobuf linux
2+
runs:
3+
using: composite
4+
steps:
5+
- name: Install protobuf linux
6+
shell: bash
7+
run: |
8+
apt-get -yq update && apt-get install -y build-essential unzip libssl-dev
9+
curl -fsSL http://cmake.org/files/v3.19/cmake-3.19.0.tar.gz | tar xz && cd cmake-3.19.0
10+
./configure --prefix=/opt/cmake && make -j2 && make install && cd .. && rm -r cmake-3.19.0
11+
echo "/opt/cmake/bin" >> $GITHUB_PATH
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Install protobuf linux
2+
runs:
3+
using: composite
4+
steps:
5+
- name: Install protobuf linux
6+
shell: bash
7+
run: |
8+
curl -fsSL https://github.com/google/protobuf/releases/download/v3.5.1/protobuf-cpp-3.5.1.tar.gz \
9+
| tar xz && \
10+
cd protobuf-3.5.1 && \
11+
./configure --prefix=/opt/protobuf && \
12+
make -j2 && \
13+
make install && \
14+
cd .. && \
15+
rm -rf protobuf-3.5.1
16+
echo "/opt/protobuf/bin" >> $GITHUB_PATH
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Setup for msys2
2+
runs:
3+
using: composite
4+
steps:
5+
- name: Initial install
6+
shell: cmd
7+
run: |
8+
C:\msys64\usr\bin\bash -lc "pacman -S --needed --noconfirm base-devel git tar pkg-config unzip p7zip zip autoconf autoconf-archive automake make patch gnupg"
9+
C:\msys64\usr\bin\bash -lc "pacman -S --needed --noconfirm mingw-w64-x86_64-nasm mingw-w64-x86_64-toolchain mingw-w64-x86_64-libtool mingw-w64-x86_64-gcc mingw-w64-i686-gcc mingw-w64-x86_64-gcc-fortran mingw-w64-i686-gcc-fortran mingw-w64-x86_64-libwinpthread-git mingw-w64-i686-libwinpthread-git mingw-w64-x86_64-SDL mingw-w64-i686-SDL mingw-w64-x86_64-ragel"
10+
echo "C:\msys64\usr\bin" >> $GITHUB_PATH
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Publish to github packages
2+
runs:
3+
using: composite
4+
steps:
5+
- name: Publish to GitHub Packages
6+
run: mvn -Pgithub --batch-mode deploy
7+
shell: bash
8+
env:
9+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Install protobuf linux
2+
runs:
3+
using: composite
4+
steps:
5+
- name: Install protobuf linux
6+
shell: bash
7+
run: |
8+
sudo apt-get install build-essential make zlib1g-dev wget
9+
wget https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.36.tar.bz2
10+
tar jxf libgpg-error-1.36.tar.bz2
11+
cd libgpg-error-1.36
12+
./configure
13+
make
14+
sudo make install
15+
cd ..
16+
wget https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.8.4.tar.bz2
17+
tar jxf libgcrypt-1.8.4.tar.bz2
18+
cd libgcrypt-1.8.4
19+
./configure
20+
make
21+
sudo make install
22+
cd ..
23+
wget https://www.gnupg.org/ftp/gcrypt/libksba/libksba-1.3.5.tar.bz2
24+
tar jxf libksba-1.3.5.tar.bz2
25+
cd libksba-1.3.5
26+
./configure
27+
make
28+
sudo make install
29+
cd ..
30+
wget https://www.gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.3.tar.bz2
31+
tar jxf libassuan-2.5.3.tar.bz2
32+
cd libassuan-2.5.3
33+
./configure
34+
make
35+
sudo make install
36+
cd ..
37+
wget https://www.gnupg.org/ftp/gcrypt/ntbtls/ntbtls-0.1.2.tar.bz2
38+
tar jxf ntbtls-0.1.2.tar.bz2
39+
cd ntbtls-0.1.2
40+
./configure
41+
make
42+
sudo make install
43+
cd ..
44+
wget https://www.gnupg.org/ftp/gcrypt/npth/npth-1.6.tar.bz2
45+
tar jxf npth-1.6.tar.bz2
46+
cd npth-1.6
47+
./configure
48+
make
49+
sudo make install
50+
cd ..
51+
echo 'include /usr/local/lib/' | sudo tee -a /etc/ld.so.conf
52+
sudo ldconfig -v
53+
wget https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-2.2.17.tar.bz2
54+
tar jxf gnupg-2.2.17.tar.bz2
55+
cd gnupg-2.2.17/
56+
./configure
57+
make
58+
sudo make install
59+
cd ..
60+
sudo apt-get install pinentry-curses
61+
#echo 'pinentry-program /usr/bin/pinentry-curses' | tee -a ~/.gnupg/gpg-agent.conf
62+
#gpg-connect-agent reloadagent /bye
63+
sudo apt-get install ca-certificates
+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
on:
2+
schedule:
3+
- cron: "0 */12 * * *"
4+
workflow_dispatch:
5+
jobs:
6+
# Wait for up to a minute for previous run to complete, abort if not done by then
7+
pre-ci:
8+
runs-on: ubuntu-latest
9+
timeout-minutes: 1
10+
steps:
11+
- name: 'Block Concurrent Executions'
12+
uses: softprops/turnstyle@v1
13+
with:
14+
poll-interval-seconds: 10
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
#Note: no -pl here because we publish everything from this branch and use this as the basis for all uploads.
18+
linux-arm64:
19+
needs: pre-ci
20+
runs-on: ubuntu-16.04
21+
steps:
22+
- uses: AutoModality/action-clean@v1
23+
- name: Cancel Previous Runs
24+
uses: styfle/[email protected]
25+
with:
26+
access_token: ${{ github.token }}
27+
- uses: actions/checkout@v2
28+
- uses: ./.github/actions/update-deps-linux
29+
- uses: ./.github/actions/install-protobuf-linux
30+
- uses: ./.github/actions/install-cmake-linux
31+
- name: Set up Java for publishing to GitHub Packages
32+
uses: actions/setup-java@v1
33+
with:
34+
java-version: 1.8
35+
server-id: sonatype-nexus-snapshots
36+
server-username: MAVEN_USERNAME
37+
server-password: MAVEN_PASSWORD
38+
gpg-private-key: ${{ secrets.SONATYPE_GPG_KEY }}
39+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
40+
- name: Build on linux-arm64
41+
shell: bash
42+
env:
43+
DEBIAN_FRONTEND: noninteractive
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
DEPLOY: 1
46+
BUILD_USING_MAVEN: 1
47+
TARGET_OS: linux
48+
CURRENT_TARGET: arm64
49+
PUBLISH_TO: ossrh
50+
DEPLOY_TO: ossrh
51+
MAVEN_USERNAME: ${{ secrets.SONATYPE_USER_1 }}
52+
MAVEN_PASSWORD: ${{ secrets.SONATYPE_USER1_PASS }}
53+
MAVEN_GPG_PASSPHRASE: ${{ secrets.PACKAGES_GPG_PASS }}
54+
55+
run: |
56+
mvn --version
57+
cmake --version
58+
protoc --version
59+
for folder in `ls`; do
60+
mvn clean test
61+
done
62+
63+

0 commit comments

Comments
 (0)