-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Trying github actions. * Fixing projects lists. * Attempt * Enable native build profiles. * Checkout submodule * Submodules. * Attempt to deploy. * Publish 2 * Attemp to fix deploy. * Attempting deploy fix. * Noop * Attemp to fix badrequest * Noop * Verbose maven. * Disable http * Change to username. * Full logs. * Adding settings. * Update version in pom.xml * Remove unnecessary switch. * Print git info. * Git fetch tags. * Git info. * Fetch all history. * Git fetch all tags. * Removed git info step. * Attemp to fix deploy of artifact with classifier. https://github.community/t5/GitHub-API-Development-and/GitHub-package-registry-as-Maven-repo-trouble-uploading-artifact/m-p/56826/highlight/true#M4777 * Deploy only one project. * Attempt to fix double upload. * Attempt to enable wagon. * Attempt to fix double-deploy. * Enable profile * Switch typo. * explicit install step. * Attach. * Attempt to join steps. * Dedicated deploy step. * Remove deploy. * Build jniwrapper-native. * Enable osx build * use api token * Disable deploy step. * Force bash shell. * Bash. * Trying upload step. * Fix upload * Name artifacts. * Download uploaded artifacts. * Fixed syntax. * Fixed sytax. * Attempt to build java. * Install. * Fixed find. * Pass file into install-file * Upload m2. * Workaround for non-expanded path. * Workaround * Attempt to build xplat. * fixed typo * Don't native deploy libraries, they are deployed being embedded into jnilib.jar * Attempt to avoid usage of personal account name. * Fetch entire history to make describe work. * Enable GitHub Actoin only on specific branches. * Deploy only if pushed into master * Fixed copy-paste.
- Loading branch information
Showing
4 changed files
with
122 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created | ||
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path | ||
|
||
name: Jitsi SCTP | ||
|
||
on: | ||
push: | ||
branches: [ master, github-actions ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build-native-libs: | ||
|
||
strategy: | ||
matrix: | ||
platform: [ubuntu-latest, macos-latest, windows-latest ] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
name: "build usrsctp and jniwrapper-native" | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: 'recursive' | ||
fetch-depth: 0 # entire history | ||
|
||
- name: Git fetch tags | ||
shell: bash | ||
run: | | ||
git fetch --all --tags | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: Setup CMake | ||
uses: jwlawson/[email protected] | ||
with: | ||
github-api-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Update version in pom.xml | ||
shell: bash | ||
run: | | ||
VERSION=`git describe --match "v[0-9\.]*" --long` | ||
echo "New version: ${VERSION:1}" | ||
mvn versions:set -DnewVersion=${VERSION:1} | ||
- name: Build native libraries artifacts | ||
shell: bash | ||
run: | | ||
mvn -B -X -U clean package install --file pom.xml --projects org.jitsi:usrsctp,org.jitsi:jniwrapper-native --also-make --activate-profiles build-usrsctp,build-jnisctp | ||
- name: Upload ~/.m2/repository/org/jitsi as artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: m2-org-jitsi | ||
path: ~/.m2/repository/org/jitsi/ | ||
|
||
build: | ||
name: "Build and publish java artifacts with bundled native libraries" | ||
needs: build-native-libs | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # entire history | ||
|
||
- name: Git fetch tags | ||
shell: bash | ||
run: | | ||
git fetch --all --tags | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: Update version in pom.xml | ||
shell: bash | ||
run: | | ||
VERSION=`git describe --match "v[0-9\.]*" --long` | ||
echo "New version: ${VERSION:1}" | ||
mvn versions:set -DnewVersion=${VERSION:1} | ||
- name: Generate Maven settings | ||
shell: bash | ||
env: | ||
GITHUB_USERNAME: ${{ github.actor }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
mkdir -p ~/.m2 | ||
echo "<settings><servers><server><id>github</id><username>${GITHUB_USERNAME}</username><password>${GITHUB_TOKEN}</password></server></servers></settings>" > ~/.m2/settings.xml | ||
- name: Download ~/.m2/repository/org/jitsi with native artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: m2-org-jitsi | ||
# full path is workaround for https://github.com/actions/download-artifact/issues/37 | ||
path: /home/runner/.m2/repository/org/jitsi/ | ||
|
||
- name: Build jitsi-sctp artifacts | ||
shell: bash | ||
run: | | ||
mvn -B -X -U package install --file pom.xml --activate-profiles build-x-plat-jar | ||
# Dedicated step to deploy artifact to avoid issue with maven uploading same package twice to GitHub packages, which causes second | ||
# copy upload failure with "422 Unprocessable Entity" and hence build failure. | ||
- name: Deploy artifacts | ||
if: github.ref == 'refs/heads/master' && github.event_name == 'push' | ||
shell: bash | ||
run: | | ||
mvn -B -X deploy --file pom.xml --activate-profiles build-x-plat-jar -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/${{ github.repository }} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters