-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#20] Update GitHub actions to support both extension and runtime
- Loading branch information
Showing
4 changed files
with
146 additions
and
5 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,65 @@ | ||
name: Linux C++17 extension | ||
|
||
on: | ||
push: | ||
branches: [ master, '*-ci' ] | ||
pull_request: | ||
branches: [ master, '*-ci' ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
zserio: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- { os: "ubuntu-20.04", java-version: 8 } | ||
- { os: "ubuntu-20.04", java-version: 11 } | ||
- { os: "ubuntu-22.04", java-version: 17 } | ||
|
||
runs-on: ${{matrix.os}} | ||
name: ${{matrix.os}}-java${{matrix.java-version}} | ||
|
||
steps: | ||
- name: "Set up environment" | ||
run: | | ||
if [[ "${{matrix.os}}" == "ubuntu-22.04" ]] ; then | ||
echo "CLANG_FORMAT_BIN=clang-format-14" >> ${GITHUB_ENV} | ||
fi | ||
echo "SPOTBUGS_HOME=${RUNNER_WORKSPACE}/spotbugs-4.8.2" >> ${GITHUB_ENV} | ||
- name: Apt update # with workaround for 'Unable to connect to ppa.launchpad.net' failure | ||
run: sudo apt-get update --option Acquire::Retries=100 --option Acquire::http::Timeout="300" | ||
|
||
- name: Set up Java ${{matrix.java-version}} | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: ${{matrix.java-version}} | ||
|
||
- name: Install clang-format-14 tool | ||
if: ${{ env.CLANG_FORMAT_BIN != '' }} | ||
run: | | ||
sudo apt-get install clang-format-14 | ||
- name: Install specific version of Java static code analysis tool (spotbugs) | ||
run: | | ||
wget https://repo.maven.apache.org/maven2/com/github/spotbugs/spotbugs/4.8.2/spotbugs-4.8.2.zip \ | ||
-P "${RUNNER_WORKSPACE}" | ||
unzip "${RUNNER_WORKSPACE}"/spotbugs-4.8.2.zip -d "${RUNNER_WORKSPACE}" | ||
- name: "Checkout" | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Build Zserio C++17 extension | ||
run: | | ||
scripts/build.sh cpp | ||
- name: Upload Zserio C++17 extension artifact | ||
# update when https://github.com/actions/upload-artifact/issues/543 is fixed | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: "zserio-cpp17-java${{matrix.java-version}}" | ||
path: distr/zserio_cpp17*.jar |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Windows C++17 extension | ||
|
||
on: | ||
push: | ||
branches: [ master, '*-ci' ] | ||
pull_request: | ||
branches: [ master, '*-ci' ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
zserio: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- { os: "windows-2022", java-version: "8" } | ||
- { os: "windows-2022", java-version: "11" } | ||
- { os: "windows-2022", java-version: "17" } | ||
|
||
runs-on: ${{matrix.os}} | ||
name: ${{matrix.os}}-java${{matrix.java-version}} | ||
|
||
steps: | ||
- name: "Set up environment" | ||
shell: bash | ||
run: | | ||
echo "CLANG_FORMAT_BIN=clang-format" >> ${GITHUB_ENV} | ||
echo "SPOTBUGS_HOME=${RUNNER_WORKSPACE}/spotbugs-4.8.2" >> ${GITHUB_ENV} | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
choco install wget | ||
choco install zip | ||
- name: Set up Java ${{matrix.java-version}} | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: ${{matrix.java-version}} | ||
|
||
- name: Install clang format | ||
shell: bash | ||
run: | | ||
choco install llvm --version=14.0.0 --allow-downgrade | ||
- name: Install specific version of Java static code analysis tool (spotbugs) | ||
shell: bash | ||
run: | | ||
wget -P "${RUNNER_WORKSPACE}" \ | ||
https://repo.maven.apache.org/maven2/com/github/spotbugs/spotbugs/4.8.2/spotbugs-4.8.2.zip | ||
unzip "${RUNNER_WORKSPACE}\spotbugs-4.8.2.zip" -d "${RUNNER_WORKSPACE}" | ||
- name: "Convert environment variables to POSIX paths" | ||
shell: bash | ||
run: | | ||
echo "ANT=/${ANT_HOME}/bin/ant" | sed -e 's/\\/\//g' -e 's/://' >> ${GITHUB_ENV} | ||
echo "JAVA_HOME=/${JAVA_HOME}" | sed -e 's/\\/\//g' -e 's/://' >> ${GITHUB_ENV} | ||
echo "SPOTBUGS_HOME=/${SPOTBUGS_HOME}" | sed -e 's/\\/\//g' -e 's/://' >> ${GITHUB_ENV} | ||
- name: "Checkout" | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Build Zserio C++17 extension | ||
shell: bash | ||
run: | | ||
scripts/build.sh cpp | ||
- name: Upload C++17 extension artifact | ||
# update when https://github.com/actions/upload-artifact/issues/543 is fixed | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: "zserio-cpp17-java${{matrix.java-version}}" | ||
path: distr/zserio_cpp17*.jar |
2 changes: 1 addition & 1 deletion
2
.github/workflows/build_windows.yml → .github/workflows/build_windows_runtime.yml
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Windows | ||
name: Windows C++17 runtime | ||
|
||
on: | ||
push: | ||
|