-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2,799 changed files
with
460,978 additions
and
36,033 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,2 @@ | ||
testdata/picard/reference/test_windows_line_endings.fasta eol=crlf | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: Cloud Tests | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: | ||
PICARD_TEST_INPUTS: gs://hellbender/test/resources/ | ||
PICARD_TEST_STAGING: gs://hellbender-test-logs/staging/ | ||
PICARD_TEST_LOGS: /hellbender-test-logs/build_reports/ | ||
PICARD_TEST_PROJECT: broad-dsde-dev | ||
|
||
jobs: | ||
## This workaround is necessary since there is no equivalent to the old TRAVIS_SECURE_ENVIRONMENT variable that indicated | ||
## if a run was privileged and had secrets. Since the GCP credentials are necessary for all tests in order to upload their, | ||
## results that makes them a reasonable proxy for testing the credentials of this entire execution. https://github.com/actions/runner/issues/520 | ||
check-secrets: | ||
name: check if the environment has privileges | ||
outputs: | ||
google-credentials: ${{ steps.google-credentials.outputs.defined }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: google-credentials | ||
env: | ||
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} | ||
if: "${{ env.GCP_CREDENTIALS != '' }}" | ||
run: echo defined=true >> $GITHUB_OUTPUT | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
needs: check-secrets | ||
strategy: | ||
matrix: | ||
java: [ 17 ] | ||
run_barclay_tests: [true, false] | ||
experimental: [ false ] | ||
fail-fast: false | ||
continue-on-error: ${{ matrix.experimental }} | ||
name: Java ${{ matrix.Java }}, Barclay=${{ matrix.run_barclay_tests}} cloud tests | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: 'Set up java ${{ matrix.Java }}' | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ matrix.Java }} | ||
distribution: 'temurin' | ||
cache: gradle | ||
|
||
- name: 'Compile with Gradle' | ||
run: | | ||
./gradlew compileJava | ||
./gradlew installDist | ||
#Google Cloud stuff | ||
- id: 'gcloud-auth' | ||
if: needs.check-secrets.outputs.google-credentials == 'true' | ||
uses: google-github-actions/auth@v0 | ||
with: | ||
credentials_json: ${{ secrets.GCP_CREDENTIALS }} | ||
project_id: ${{ env.PICARD_TEST_PROJECT }} | ||
create_credentials_file: true | ||
|
||
- name: 'Set up Cloud SDK' | ||
if: needs.check-secrets.outputs.google-credentials == 'true' | ||
uses: google-github-actions/setup-gcloud@v2 | ||
|
||
- name: compile test code | ||
if: needs.check-secrets.outputs.google-credentials == 'true' | ||
run: ./gradlew compileTestJava | ||
|
||
- name: Run tests | ||
if: needs.check-secrets.outputs.google-credentials == 'true' | ||
env: | ||
TEST_TYPE: cloud | ||
run: | | ||
if [[ ${{matrix.run_barclay_tests}} == true ]]; then | ||
echo "Running tests using the Barclay command line parser." | ||
./gradlew barclayTest | ||
else | ||
echo "Running tests using the legacy Picard command line parser." | ||
./gradlew jacocoTestReport | ||
fi | ||
- name: Upload test results | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: cloud-test-results-${{ matrix.Java }}-barclay-${{ matrix.run_barclay_tests}} | ||
path: build/reports/tests |
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,59 @@ | ||
# This is a github actions workflow which runs picard tests | ||
|
||
name: Build and Test | ||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
java: [ 17 ] | ||
experimental: [false] | ||
run_barclay_tests: [true, false] | ||
fail-fast: false | ||
continue-on-error: ${{ matrix.experimental }} | ||
name: Java ${{ matrix.Java }}, Barclay=${{ matrix.run_barclay_tests}} tests | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up java ${{ matrix.Java }} | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ matrix.Java }} | ||
distribution: 'temurin' | ||
cache: gradle | ||
- name: "set up R" | ||
run: | | ||
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | ||
sudo apt-get -qq update | ||
sudo apt-get install -y --no-install-recommends r-base-dev r-recommended qpdf | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Compile with Gradle | ||
run: ./gradlew compileJava | ||
- name: Run tests | ||
run: | | ||
if [[ ${{matrix.run_barclay_tests}} == true ]]; then | ||
echo "Running tests using the Barclay command line parser." | ||
./gradlew barclayTest | ||
else | ||
echo "Running tests using the legacy Picard command line parser." | ||
./gradlew jacocoTestReport | ||
fi | ||
- name: "Build the jar and run a commandline test for sanity checking" | ||
run: | | ||
./gradlew currentJar | ||
java -jar build/libs/picard.jar MarkDuplicates -I testdata/picard/sam/aligned_queryname_sorted.bam -O out.bam --METRICS_FILE out.metrics | ||
- name: Upload test results | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test-results-${{ matrix.Java }}-barclay-${{ matrix.run_barclay_tests}} | ||
path: build/reports/tests | ||
|
||
|
||
|
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,12 @@ | ||
name: dsp-appsec-trivy | ||
on: [pull_request] | ||
|
||
jobs: | ||
appsec-trivy: | ||
# Parse Dockerfile and build, scan image if a "blessed" base image is not used | ||
name: DSP AppSec Trivy check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: broadinstitute/dsp-appsec-trivy-action@v1 |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,35 +1,37 @@ | ||
FROM openjdk:8 | ||
MAINTAINER Broad Institute DSDE <[email protected]> | ||
ARG BASE_DOCKER=eclipse-temurin:17-jdk | ||
ARG release=false | ||
|
||
ARG build_command=shadowJar | ||
ARG jar_name=picard.jar | ||
FROM ${BASE_DOCKER} as build | ||
LABEL stage=buildStage | ||
|
||
# Install ant, git for building | ||
# Install git for building | ||
RUN apt-get update && \ | ||
apt-get --no-install-recommends install -y --force-yes \ | ||
git \ | ||
r-base \ | ||
ant && \ | ||
apt-get clean autoclean && \ | ||
apt-get autoremove -y | ||
apt-get --no-install-recommends install -y \ | ||
git | ||
|
||
# Assumes Dockerfile lives in root of the git repo. Pull source files into container | ||
COPY / /usr/picard/ | ||
WORKDIR /usr/picard | ||
|
||
# Build the distribution jar, clean up everything else | ||
RUN ./gradlew ${build_command} && \ | ||
mv build/libs/${jar_name} picard.jar && \ | ||
mv src/main/resources/picard/docker_helper.sh docker_helper.sh && \ | ||
./gradlew clean && \ | ||
rm -rf src && \ | ||
rm -rf gradle && \ | ||
rm -rf .git && \ | ||
rm gradlew && \ | ||
rm build.gradle | ||
# download gradle then build | ||
RUN ./gradlew -Drelease=${release} \ | ||
clean \ | ||
printVersion \ | ||
shadowJar | ||
|
||
FROM ${BASE_DOCKER} as final | ||
MAINTAINER Broad Institute DSDE <[email protected]> | ||
|
||
# Install R | ||
RUN apt-get update && \ | ||
apt-get --no-install-recommends install -y \ | ||
r-base &&\ | ||
apt-get clean autoclean && \ | ||
apt-get autoremove -y | ||
|
||
RUN mkdir /usr/picard/ | ||
|
||
COPY --from=build /usr/picard/build/libs/picard.jar /usr/picard/ | ||
|
||
RUN mkdir /usr/working | ||
WORKDIR /usr/working | ||
|
||
ENTRYPOINT ["/usr/picard/docker_helper.sh"] | ||
CMD [""] |
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
Oops, something went wrong.