build-develop #523
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
name: build-develop | |
# Controls when the action will run. Workflow runs when manually triggered using the UI | |
# or API. | |
on: | |
push: | |
branches-ignore: | |
- develop | |
- stable | |
paths-ignore: | |
- 'docs/**' | |
- '.github/**' | |
pull_request: | |
branches: [ develop ] | |
schedule: | |
- cron: "0 7 * * *" | |
workflow_dispatch: | |
jobs: | |
build_against_dev_release: | |
name: build_against_dev | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- name: change dir permission | |
run: | | |
sudo chmod -R go+rwx /var/lib/cvmfs | |
- name: Cache cvmfs cache | |
id: cvmfs_cache | |
uses: actions/cache@v3 | |
with: | |
path: /var/lib/cvmfs/shared | |
key: cachecvmfs | |
- name: restore dir permission | |
run: | | |
sudo chown -R cvmfs.cvmfs /var/lib/cvmfs | |
sudo chmod -R go-rwx /var/lib/cvmfs | |
- name: Checkout pkg | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ github.repository }} | |
path: scratch/${{ github.repository }} | |
- name: run build in docker container with cvmfs bind mount | |
run: | | |
cd $GITHUB_WORKSPACE/scratch | |
cat << EOT > build_pkg.sh | |
#!/bin/bash | |
cd /opt/otsdaq | |
source /opt/otsdaq/products/setup | |
source /opt/otsdaq/setup_ots.sh || exit 1 | |
mrb updateSource | |
export REPO=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}') | |
cp -pr /scratch/art-daq/$REPO srcs | |
echo "Starting build" | |
mrb b 2>&1 | tee /scratch/art-daq/build.log | |
exit $? | |
EOT | |
chmod +x build_pkg.sh | |
docker run --rm -v /cvmfs:/cvmfs:shared -v $GITHUB_WORKSPACE/scratch:/scratch eflumerf/artdaq-suite:latest /scratch/build_pkg.sh | |
- name: Check build log for success | |
run: | | |
grep "INFO: stage build SUCCESS" ${{ github.workspace }}/scratch/art-daq/build.log | |
- name: upload build log file | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build_log | |
path: ${{ github.workspace }}/scratch/art-daq/build.log | |
- name: change dir permission again | |
run: | | |
sudo chmod -R go+rwx /var/lib/cvmfs |