forked from wtsi-npg/p4
-
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.
Merge pull request #1 from wtsi-npg/devel
Update
- Loading branch information
Showing
102 changed files
with
7,206 additions
and
1,794 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,4 @@ | ||
.DS_Store | ||
*~ | ||
*.iml | ||
.idea/ |
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,10 @@ | ||
# Referenced from: | ||
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot | ||
|
||
version: 2 | ||
updates: | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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: "Publish Docker Image" | ||
|
||
on: | ||
push: | ||
tags: | ||
- "**" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -l -e -o pipefail {0} | ||
|
||
env: | ||
IMAGE_NAME: p4 | ||
REPOSITORY_OWNER: ${{ github.repository_owner }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: "Fetch Tags" | ||
# Workaround for https://github.com/actions/checkout/issues/290 | ||
run: git fetch --tags --force | ||
|
||
- name: "Get release variables" | ||
# RELEASE_VERSION assignment must match the command used in autoconf's | ||
# configure.ac file. On update, care should be taken to maintain both | ||
# sides congruent. | ||
run: | | ||
echo 'RELEASE_VERSION='$(git describe --always --tags --dirty) >> $GITHUB_ENV | ||
echo 'GIT_URL='$(git remote get-url origin) >> $GITHUB_ENV | ||
echo 'GIT_COMMIT='$(git log --pretty=format:'%H' -n 1) >> $GITHUB_ENV | ||
- name: "Login to Docker registry" | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: "Build Docker image" | ||
run: | | ||
docker build --rm \ | ||
--file Dockerfile \ | ||
--platform linux/amd64 \ | ||
--progress plain \ | ||
--load \ | ||
--label "org.opencontainers.image.title=${IMAGE_NAME}" \ | ||
--label "org.opencontainers.image.source=${GIT_URL}" \ | ||
--label "org.opencontainers.image.revision=${GIT_COMMIT}" \ | ||
--label "org.opencontainers.image.version=${RELEASE_VERSION}" \ | ||
--label "org.opencontainers.image.created=$(date --utc --iso-8601=seconds)" \ | ||
--label "org.opencontainers.image.vendor=npg.sanger.ac.uk" \ | ||
--tag "ghcr.io/${REPOSITORY_OWNER}/${IMAGE_NAME}:${RELEASE_VERSION}" \ | ||
--tag "ghcr.io/${REPOSITORY_OWNER}/${IMAGE_NAME}:latest" \ | ||
. | ||
- name: "Push Docker image to registry" | ||
run: | | ||
docker push "ghcr.io/$REPOSITORY_OWNER/$IMAGE_NAME:$RELEASE_VERSION" | ||
docker push "ghcr.io/$REPOSITORY_OWNER/$IMAGE_NAME:latest" |
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: testing_and_building_repo | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: Distribution Perl on ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Caching cpanm external modules | ||
- name: Cache cpanm external modules | ||
id: cpanmCache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/perl5ext | ||
key: ${{ runner.os }}-build-cpanm-external | ||
|
||
- name: install cpanm | ||
run: | | ||
wget -qO - https://cpanmin.us | /usr/bin/perl - --sudo App::cpanminus | ||
# run the perl install script | ||
- name: install NPG Perl dependencies, and their CPAN dependencies | ||
run: | | ||
cpanm --local-lib=~/perl5ext local::lib && eval $(perl -I ~/perl5ext/lib/perl5/ -Mlocal::lib) | ||
${GITHUB_WORKSPACE}/scripts/install_npg_perl_dependencies.sh $WTSI_NPG_GITHUB_URL $WTSI_NPG_BUILD_BRANCH | ||
env: | ||
WTSI_NPG_GITHUB_URL: https://github.com/wtsi-npg | ||
WTSI_NPG_BUILD_BRANCH: ${GITHUB_HEAD_REF} | ||
|
||
- name: install cpanm dependencies | ||
run: | | ||
eval $(perl -I ~/perl5ext/lib/perl5/ -Mlocal::lib=~/perl5npg) | ||
eval $(perl -I ~/perl5ext/lib/perl5/ -Mlocal::lib=~/perl5ext) | ||
cpanm --installdeps --notest . | ||
- name: run Build.PL and ./Build | ||
run: | | ||
eval $(perl -I ~/perl5ext/lib/perl5/ -Mlocal::lib=~/perl5ext) | ||
eval $(perl -I ~/perl5ext/lib/perl5/ -Mlocal::lib=~/perl5npg) | ||
export TEST_AUTHOR=1 | ||
perl Build.PL | ||
./Build test --verbose | ||
./Build install | ||
# running ./Build dist and exporting files | ||
- name: run ./Build dist | ||
run: | | ||
eval $(perl -I ~/perl5ext/lib/perl5/ -Mlocal::lib=~/perl5ext) | ||
export TEST_AUTHOR=1 | ||
./Build dist | ||
export DIST_FILE=$(ls p4-*.tar.gz) | ||
export MD5_FILE=$DIST_FILE.md5 | ||
md5sum $DIST_FILE > $MD5_FILE | ||
export SHA256_FILE=$DIST_FILE.sha256 | ||
shasum -a 256 $DIST_FILE > $SHA256_FILE | ||
# Archive logs if failure | ||
- name: Archive CPAN logs | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: cpan_log | ||
path: /home/runner/.cpanm/work/*/build.log | ||
retention-days: 5 |
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
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.