forked from apache/hadoop
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (68 loc) · 2.35 KB
/
build-hadoop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Build Hadoop
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
# schedule:
# - cron: '*/15 * * * *'
workflow_dispatch:
push:
branches: [ "**" ]
# push:
# branches: [ "main" ]
# # Publish semver tags as releases.
# tags: [ 'v*.*.*' ]
# pull_request:
# branches: [ "main" ]
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
steps:
- name: Checkout Hadoop
uses: actions/checkout@v4
with:
repository: UrbanOS-Public/urbanos-hadoop
path: hadoop-3.3 # Store in $GITHUB_WORKSPACE/other-repo
ref: branch-3.3
- name: Setup Java JDK
uses: actions/[email protected]
with:
java-version: 8
distribution: temurin
- name: Install Dependencies
run: |
# Maven
sudo apt-get -y install maven
# Native libraries
sudo apt-get -y install build-essential autoconf automake libtool cmake zlib1g-dev pkg-config libssl-dev libsasl2-dev
# Protocol Buffers 3.7.1 (required to build native code)
curl -L -s -S https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protobuf-java-3.7.1.tar.gz -o protobuf-3.7.1.tar.gz
mkdir protobuf-3.7-src
tar xzf protobuf-3.7.1.tar.gz --strip-components 1 -C protobuf-3.7-src && cd protobuf-3.7-src
./configure
make -j$(nproc)
sudo make install
cd ..
- name: Build Hadoop
run: |
cd hadoop-3.3
mvn package -Pdist -DskipTests -Dtar -Dmaven.javadoc.skip=true
- name: 'Tar files'
run: tar -cvf hadoop-3.3.tar -C hadoop-3.3/hadoop-dist/target hadoop-3.3.9-SNAPSHOT
- name: Upload Hadoop Build Artifact
uses: actions/[email protected]
with:
name: hadoop-3.3
path: hadoop-3.3.tar