Skip to content

Commit

Permalink
Merge pull request #139 from drbitboy/resurrector
Browse files Browse the repository at this point in the history
Resurrector
  • Loading branch information
jaredmales authored Dec 1, 2023
2 parents 2bbc93b + b1e67c1 commit 138d6eb
Show file tree
Hide file tree
Showing 120 changed files with 14,223 additions and 6,875 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/build-doxygen.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
name: Build C++ Doxygen documentation
on: [push]
name: Doxygen
on:
push:
branches:
- 'dev'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- run: sudo apt-get install -y doxygen graphviz ssh rsync
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v4
- run: cd ${{ github.workspace }} && doxygen doc/config/Doxyfile.libMagAOX
- name: Add SSH key
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
mkdir -p /home/runner/.ssh
echo "xwcl.science ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBjRMNGtwNllMxj3uy5GGD1f/jw/4f/l5PJG9xK2QXUC" >> /home/runner/.ssh/known_hosts
echo "xwcl.science ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAqGanUWS9Wb34oCHCDX2xqhlCstMTN9c0oFoKJkYtZ3" >> /home/runner/.ssh/known_hosts
echo "${{ secrets.DEPLOY_GARY }}" > /home/runner/.ssh/github_actions
chmod 600 /home/runner/.ssh/github_actions
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Container build
on:
workflow_run:
workflows: ["Rocky build"]
types: [completed]
branches: [dev]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-rocky:
runs-on: ubuntu-latest
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
file: Dockerfile.rocky
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
19 changes: 0 additions & 19 deletions .github/workflows/install-on-centos.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/install-rocky.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Rocky build"
on:
push:
schedule:
- cron: '43 5 * * *'
jobs:
install-rocky:
runs-on: ubuntu-latest
container:
image: rockylinux/rockylinux:9-ubi-init
env:
MAGAOX_ROLE: ci
steps:
- name: Install git for checkout action
run: 'dnf install -y git'
- name: Check out repository code
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/[email protected]
with:
path: /opt/MagAOX/
key: rocky-9-dependencies-cache-v1-${{ hashFiles('setup/*', 'setup/**/*') }}
- run: 'bash -x setup/steps/install_rocky_9.2_packages.sh'
name: Install OS dependencies
- run: 'bash -lx setup/provision.sh'
name: Auto-provision
- run: 'bash -l setup/steps/install_MagAOX.sh'
name: Install MagAO-X
# - run: 'make test'
# name: Run tests
34 changes: 34 additions & 0 deletions .github/workflows/install-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Ubuntu build"
on:
push:
schedule:
- cron: '43 5 * * *'
jobs:
install-ubuntu:
runs-on: ubuntu-latest
container:
image: ubuntu:22.04
env:
MAGAOX_ROLE: ci
NEEDRESTART_SUSPEND: 'yes'
DEBIAN_FRONTEND: noninteractive
steps:
- name: Fetch package definitions
run: 'apt-get update'
- name: Install git for checkout action
run: 'apt-get install -y git'
- name: Check out repository code
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/[email protected]
with:
path: /opt/MagAOX/
key: ubuntu-22.04-dependencies-cache-v1-${{ hashFiles('setup/*', 'setup/**/*') }}
- run: 'bash -x setup/steps/install_ubuntu_22.04_packages.sh'
name: Install OS dependencies
- run: 'bash -lx setup/provision.sh'
name: Auto-provision
- run: 'bash -l setup/steps/install_MagAOX.sh'
name: Install MagAO-X
# - run: 'make test'
# name: Run tests
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ apps/bmcCtrl/bmcCtrl

#c
apps/cacaoInterface/cacaoInterface
apps/cameraSim/cameraSim

#d
apps/dmMode/dmMode
Expand Down Expand Up @@ -117,6 +118,7 @@ apps/picamCtrl/picamCtrl
apps/picoMotorCtrl/picoMotorCtrl
apps/pupilAlign/pupilAlign
apps/pupilFit/pupilFit
apps/pvcamCtrl/pvcamCtrl
apps/pwfsSlopeCalc/pwfsSlopeCalc
apps/photonCounter

Expand Down Expand Up @@ -186,6 +188,8 @@ utils/doc
tests/singleTest
tests/testMagAOX
tests/testMagAOXsetuid
tests/test_stderr.txt


#Devel stuff in flatlogs
flatlogs/src/flatlogcodes
Expand Down
14 changes: 14 additions & 0 deletions Dockerfile.rocky
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM rockylinux/rockylinux:9-ubi-init
ENV MAGAOX_ROLE container
RUN echo "MAGAOX_ROLE=${MAGAOX_ROLE}" > /etc/profile.d/magaox_role.sh
ADD ./setup/_common.sh /setup/
ADD ./setup/steps/install_rocky_9.2_packages.sh /setup/steps/
RUN bash /setup/steps/install_rocky_9.2_packages.sh
ADD ./setup/setup_users_and_groups.sh /setup/
RUN bash /setup/setup_users_and_groups.sh
ADD ./setup/steps/configure_rocky_9.2.sh /setup/steps/
RUN bash /setup/steps/configure_rocky_9.2.sh
ADD . /opt/MagAOX/source/MagAOX
WORKDIR /opt/MagAOX/source/MagAOX/setup
RUN bash -lx provision.sh
USER xsup
40 changes: 20 additions & 20 deletions Dockerfile → Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
FROM ubuntu:jammy-20220130
ENV DEBIAN_FRONTEND noninteractive
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get update
RUN apt-get install -y systemd sudo apt-utils ssh
ENV MAGAOX_ROLE container
RUN echo "MAGAOX_ROLE=${MAGAOX_ROLE}" > /etc/profile.d/magaox_role.sh
ADD ./setup/_common.sh /setup/
ADD ./setup/setup_users_and_groups.sh /setup/
RUN bash /setup/setup_users_and_groups.sh
ADD ./setup/steps/install_ubuntu_22.04_packages.sh /setup/steps/
RUN bash /setup/steps/install_ubuntu_22.04_packages.sh
ADD ./setup/steps/configure_ubuntu_22.04.sh /setup/steps/
RUN bash /setup/steps/configure_ubuntu_22.04.sh
ADD . /opt/MagAOX/source/MagAOX
WORKDIR /opt/MagAOX/source/MagAOX/setup
# RUN bash setup_users_and_groups.sh
# RUN bash provision.sh
ENV DEBIAN_FRONTEND dialog
RUN echo 'debconf debconf/frontend select Dialog' | debconf-set-selections
FROM ubuntu:jammy-20220130
ENV DEBIAN_FRONTEND noninteractive
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get update
RUN apt-get install -y systemd sudo apt-utils ssh
ENV MAGAOX_ROLE container
RUN echo "MAGAOX_ROLE=${MAGAOX_ROLE}" > /etc/profile.d/magaox_role.sh
ADD ./setup/_common.sh /setup/
ADD ./setup/setup_users_and_groups.sh /setup/
RUN bash /setup/setup_users_and_groups.sh
ADD ./setup/steps/install_ubuntu_22.04_packages.sh /setup/steps/
RUN bash /setup/steps/install_ubuntu_22.04_packages.sh
ADD ./setup/steps/configure_ubuntu_22.04.sh /setup/steps/
RUN bash /setup/steps/configure_ubuntu_22.04.sh
ADD . /opt/MagAOX/source/MagAOX
WORKDIR /opt/MagAOX/source/MagAOX/setup
# RUN bash setup_users_and_groups.sh
# RUN bash provision.sh
ENV DEBIAN_FRONTEND dialog
RUN echo 'debconf debconf/frontend select Dialog' | debconf-set-selections
# USER xsup
Loading

0 comments on commit 138d6eb

Please sign in to comment.