Skip to content

Commit

Permalink
Try simplify centOS image use
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonMarechal25 committed Oct 9, 2023
1 parent a18118e commit 9e9dbae
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 109 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build_centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: tj-actions/changed-files@v32
with:
files: |
docker/centos7-bare
docker/centos7-system-deps
- name: Docker file push
id: docker_push
Expand All @@ -36,9 +36,9 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: docker
dockerfile: centos7-bare
dockerfile: centos7-system-deps
cache: false
tags: centos7-xpansion-bare
tags: centos7-system-deps

versions:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
build:
runs-on: ubuntu-latest
needs: [ docker_publish, versions ]
container: 'antaresrte/rte-antares:centos7-xpansion-bare'
container: 'antaresrte/rte-antares:centos7-system-deps'
strategy:
matrix:
xprs: [ XPRESS-ON, XPRESS-OFF ]
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/centos-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: tj-actions/changed-files@v32
with:
files: |
docker/centos7-bare
docker/centos7-system-deps
- name: Docker file push
id: docker_push
Expand All @@ -43,9 +43,9 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: docker
dockerfile: centos7-bare
dockerfile: centos7-system-deps
cache: false
tags: centos7-xpansion-bare
tags: centos7-system-deps

userguide:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
build:
runs-on: ubuntu-latest
needs: [ docker_publish, userguide, versions ]
container: 'antaresrte/rte-antares:centos7-xpansion-bare'
container: 'antaresrte/rte-antares:centos7-system-deps'
strategy:
matrix:
xprs: [ XPRESS-ON, XPRESS-OFF ]
Expand Down
46 changes: 26 additions & 20 deletions .github/workflows/centos7-system-deps-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,31 @@ on:
- release/*
- ci/*
jobs:
docker_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v32
with:
files: |
docker/centos7-system-deps
- name: Docker file push
id: docker_push
if: steps.changed-files.outputs.any_changed == 'true'
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: antaresrte/rte-antares
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: docker
dockerfile: centos7-system-deps
cache: false
tags: centos7-system-deps

versions:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -42,31 +67,12 @@ jobs:

runs-on: ubuntu-latest
needs: versions
container: 'centos:7'
container: 'antaresrte/rte-antares:centos7-system-deps'

steps:
- id: branch-name
uses: tj-actions/branch-names@v6

- name: Set up Python
run: |
yum update -y
yum install -y python3 python3-pip
pip3 install --upgrade pip
- name: Install libraries
run: |
yum install -y wget git epel-release redhat-lsb-core gcc gcc-c++ make centos-release-scl scl-utils
yum install -y jsoncpp-devel gtest-devel openmpi-devel doxygen graphviz boost-program-options
yum install -y cmake3 devtoolset-9 environment-modules rpm-build zlib-devel
yum install -y rh-git227-git
yum install -y libuuid-devel
- name: update bashrc
run: |
echo "source scl_source enable rh-git227" >> ~/.bashrc
echo "source scl_source enable devtoolset-9" >> ~/.bashrc
- run: |
git --version
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish_centos_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: docker
dockerfile: centos7-bare
dockerfile: centos7-system-deps
cache: false
tags: centos7-xpansion-bare
tags: centos7-system-deps
46 changes: 0 additions & 46 deletions docker/centos7

This file was deleted.

33 changes: 0 additions & 33 deletions docker/centos7-bare

This file was deleted.

27 changes: 27 additions & 0 deletions docker/centos7-system-dpes
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM centos:7

# Install requirements: update repo
RUN yum update -y

# Install requirements : install epel
RUN yum install -y epel-release

RUN \
yum install -y wget git epel-release redhat-lsb-core gcc gcc-c++ make centos-release-scl scl-utils &&\
yum install -y jsoncpp-devel gtest-devel openmpi-devel doxygen graphviz boost-program-options &&\
yum install -y cmake3 devtoolset-9 environment-modules rpm-build zlib-devel &&\
yum install -y rh-git227-git &&\
yum install -y libuuid-devel

RUN \
echo "source scl_source enable rh-git227" >> ~/.bashrc &&\
echo "source scl_source enable devtoolset-9" >> ~/.bashrc

# Add python and pip installation for antares-xpansion
RUN yum install -y python3-pip &&\
python3 -m pip install --upgrade pip &&\
pip3 install pyinstaller pyyaml pytest numpy touch pytest-cov mkdocs mkdocs-material

#create user
RUN useradd user
# USER user

0 comments on commit 9e9dbae

Please sign in to comment.