forked from java-native-access/jna
-
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.
Split pr and normal build (java-native-access#127)
Motivation: We should better use seperate workflows for PR and normal builds Modifications: - Split workflows Result: Cleanup
- Loading branch information
1 parent
5a50e91
commit da8b007
Showing
3 changed files
with
52 additions
and
17 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,15 @@ | ||
#!/bin/bash | ||
|
||
if [ "$#" -ne 1 ]; then | ||
echo "Expected build log as argument" | ||
exit 1 | ||
fi | ||
|
||
if grep -q 'LEAK:' $1 ; then | ||
echo "Leak detected, please inspect build log" | ||
exit 1 | ||
else | ||
echo "No Leak detected" | ||
exit 0 | ||
fi | ||
|
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,37 @@ | ||
name: Build project | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-linux-x86_64: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Enable caching of Docker layers | ||
- uses: satackey/[email protected] | ||
continue-on-error: true | ||
with: | ||
key: pr-linux-x86_64-docker-cache-{hash} | ||
restore-keys: | | ||
pr-linux-x86_64-docker-cache- | ||
- name: Build docker image | ||
run: docker-compose -f docker/docker-compose.centos-6.yaml -f docker/docker-compose.centos-6.18.yaml build | ||
|
||
- name: Build project with leak detection | ||
run: docker-compose -f docker/docker-compose.centos-6.yaml -f docker/docker-compose.centos-6.18.yaml run build-leak | tee build-leak.output | ||
|
||
- name: Checking for detected leak | ||
run: ./.github/scripts/check_leak.sh build-leak.output | ||
|
||
- uses: actions/upload-artifact@v2 | ||
if: ${{ failure() }} | ||
with: | ||
name: target | ||
path: "**/target/" |