Skip to content

Merge pull request #6709 from troizet/git_toolbar_separators #1

Merge pull request #6709 from troizet/git_toolbar_separators

Merge pull request #6709 from troizet/git_toolbar_separators #1

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ----------------------
#
# This workflow builds the native binaries for dlight.nativeexecution.
#
# The following builds are made:
# - On a Linux X64 host :
# - Linux X64 binary
# - On a MacOS X64 host :
# - MacOS X64 binary
# - MacOS ARM64 binary
# - On a Windows Server X64 host (TODO) :
# - Windows X64 binary
#
# ..meaning we build 32-bit binaries on 64-bit hosts.
#
# The result of the build are files 'nativeexecution-external-sources.zip'
# and 'nativeexecution-external-binaries.zip' which can be downloaded from
# the GitHub Actions UI and prepared for release to be used by the Ant build
# scripts for the NetBeans distribution.
#
# ----------------------
name: NetBeans Native Execution Libraries
on:
# Triggers the workflow on push or pull request events but only for
# relevant paths
push:
paths:
- .github/workflows/native-binary-build-dlight.nativeexecution.y*
- ide/dlight.nativeexecution/**
pull_request:
paths:
- .github/workflows/native-binary-build-dlight.nativeexecution.y*
- ide/dlight.nativeexecution/**
# Allows you to run this workflow manually from the Actions tab in GitHub UI
workflow_dispatch:
# cancel other PR workflow run in the same head-base group if it exists (e.g. during PR syncs)
# if this is not a PR run (no github.head_ref and github.base_ref defined), use an UID as group
concurrency:
group: dlight-${{ github.head_ref || github.run_id }}-${{ github.base_ref }}
cancel-in-progress: true
jobs:
source:
name: Build Source Zip
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: false
show-progress: false
- name: Generate source bundle
run: |
SOURCES="ide/dlight.nativeexecution/build/sources"
mkdir -p ${SOURCES}/ide/dlight.nativeexecution
cp -r ide/dlight.nativeexecution/tools/ ${SOURCES}/ide/dlight.nativeexecution/
cp -r ide/dlight.nativeexecution/release/ ${SOURCES}/ide/dlight.nativeexecution/
cp LICENSE ${SOURCES}/LICENSE
cp NOTICE ${SOURCES}/NOTICE
ls -l -R ${SOURCES}
- name: Upload native sources
uses: actions/upload-artifact@v3
with:
name: nativeexecution-external-sources
path: ide/dlight.nativeexecution/build/sources/
if-no-files-found: error
build-linux:
name: Build on Linux
runs-on: ubuntu-latest
needs: source
steps:
- name: Download sources
uses: actions/download-artifact@v3
with:
name: nativeexecution-external-sources
- name: Build native lib (64-bit)
run: |
echo "Building 64-bit binary"
rm -rf ../release/bin/nativeexecution/Linux-x86_64/*
rm -rf buildall/*
chmod +x buildjob.sh
./buildjob.sh Linux x86_64
ls -l -R buildall/
echo "done"
working-directory: ide/dlight.nativeexecution/tools
- name: Upload artifact Linux 64 bit
uses: actions/upload-artifact@v3
with:
name: Linux-x86_64
path: ide/dlight.nativeexecution/tools/buildall/
if-no-files-found: error
# TODO : configure cygwin
# build-windows:
#
# name: Build on Windows
# runs-on: windows-latest
# needs: source
#
# steps:
#
# - name: Download sources
# uses: actions/download-artifact@v3
# with:
# name: nativeexecution-external-sources
#
# - name: Build native lib (64-bit)
# run: |
# echo "Building 64-bit binary"
# rm -f ../release/bin/nativeexecution/Windows-x86_64/*
# sh ./buildall.sh
# ls -l -R ../release/bin/nativeexecution/Windows-x86_64
# echo "done"
# shell: bash
# working-directory: ide/dlight.nativeexecution/tools
# - name: Upload artifact Windows 64 bit
# uses: actions/upload-artifact@v3
# with:
# name: Windows-x86_64
# path: ide/dlight.nativeexecution/tools/buildall/
# if-no-files-found: error
#
build-macos-x64:
name: Build on MacOS x86_64
runs-on: macos-latest
needs: source
steps:
- name: Download sources
uses: actions/download-artifact@v3
with:
name: nativeexecution-external-sources
- name: Build native lib (x86_64)
run: |
rm -rf ../release/bin/nativeexecution/Linux-MacOSX*/*
rm -rf buildall/*
chmod +x buildjob.sh
./buildjob.sh MacOSX x86_64
ls -l -R buildall/
working-directory: ide/dlight.nativeexecution/tools
- name: Upload artifact macOS x86_64
uses: actions/upload-artifact@v3
with:
name: MacOSX-x86_64
path: ide/dlight.nativeexecution/tools/buildall/
if-no-files-found: error
build-macos-arm:
name: Build on MacOS arm64
runs-on: macos-latest
needs: source
steps:
- name: Download sources
uses: actions/download-artifact@v3
with:
name: nativeexecution-external-sources
- name: Build native lib (arm64)
run: |
rm -rf ../release/bin/nativeexecution/Linux-MacOSX*/*
rm -rf buildall/*
chmod +x buildjob.sh
./buildjob.sh MacOSX arm
ls -l -R buildall/
working-directory: ide/dlight.nativeexecution/tools
- name: Upload artifact macOS arm64
uses: actions/upload-artifact@v3
with:
name: MacOSX-arm_64
path: ide/dlight.nativeexecution/tools/buildall/
if-no-files-found: error
build-zip-with-build-artifacts:
name: Package Native Execution Libraries
runs-on: ubuntu-latest
# Only run when the platform specific builds are finished
needs: [build-linux, build-macos-x64, build-macos-arm]
steps:
- name: Create dir structure
run: mkdir -p myfiles/
- name: Download artifacts from predecessor jobs
uses: actions/download-artifact@v3
with:
path: myfiles/
- name: Tidy up and display artifacts
run: |
cp myfiles/nativeexecution-external-sources/LICENSE myfiles/LICENSE
cp myfiles/nativeexecution-external-sources/NOTICE myfiles/NOTICE
rm -rf myfiles/*sources*
ls -l -R
- name: Create BUILDINFO
run: |
BUILDINFO="myfiles/BUILDINFO.txt"
touch "$BUILDINFO"
echo "Apache NetBeans" >> "$BUILDINFO"
echo "" >> "$BUILDINFO"
echo "Binaries in this ZIP are..." >> "$BUILDINFO"
echo "Build by GitHub Actions Workflow: ${GITHUB_WORKFLOW}" >> "$BUILDINFO"
echo "" >> "$BUILDINFO"
echo "Build from:" >> "$BUILDINFO"
echo " Git repo : ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" >> "$BUILDINFO"
echo " Git commit SHA : ${GITHUB_SHA}" >> "$BUILDINFO"
echo " Git ref : ${GITHUB_REF}" >> "$BUILDINFO"
echo "" >> "$BUILDINFO"
echo "Build time UTC : $(date --rfc-3339=seconds --utc)" >> "$BUILDINFO"
echo "" >> "$BUILDINFO"
- name: Upload bundle
uses: actions/upload-artifact@v3
with:
name: nativeexecution-external-binaries
path: myfiles/
if-no-files-found: error