Skip to content

Commit

Permalink
Feature/centos7 build (#7)
Browse files Browse the repository at this point in the history
* first test with centos7 build

* no sudo on docker images

* forgot y for yum update

* forgot cmake installation

* cmake3 needed for centos7

* need gcc 7.5

* add scl-utils install

* install devtoolset-7 with a new command

* install cmake3 with a new command

* forgot git install

* add autoconf pour curl compilation

* add automake pour curl compilation

* add libtool for curl compilation

* add gtk2-devel for wxWidgets

* test centso7 build with sh

* print gcc version

* remove shell selection from scl enable devtoolset-7

* remove configure to get only gcc version

* enable devtoolset-7 with source

* test build with enable devtoolset-7 with source

* add release job for centos7
  • Loading branch information
jmkerloch authored Feb 17, 2021
1 parent 3adcd59 commit 05a16cf
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/centos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Centos 7 CI

on:
push:
branches:
- main
- feature/*
- fix/*
jobs:

build:

if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
buildtype: [Release]
system_build: [ON,OFF]
include:
- system_build: ON
build_name: "all"
- system_build: OFF
build_name: "solver"

runs-on: ubuntu-latest
container: 'centos:7'

steps:
- uses: actions/checkout@v2

- name: Install libraries
run: |
yum update -y
yum install -y git epel-release redhat-lsb-core autoconf automake libtool gtk2-devel gcc gcc-c++ make centos-release-scl scl-utils
yum install -y cmake3 devtoolset-7
- name: Configure and build
run: |
source /opt/rh/devtoolset-7/enable
cmake3 -B _build -S . -DBUILD_not_system=ON -DBUILD_system=${{ matrix.system_build }} -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }} -DDEPS_INSTALL_DIR=rte-antares-deps-${{ matrix.buildtype }}
- name: Archive upload
uses: actions/upload-artifact@v2
with:
name: antares-deps-centos7-${{ matrix.buildtype }}-${{ matrix.build_name }}
path: |
rte-antares-deps-${{ matrix.buildtype }}
56 changes: 56 additions & 0 deletions .github/workflows/releasesCentos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release asset upload (Centos7)

on:
release:
types: [created]

env:
GITHUB_TOKEN: ${{ github.token }}

jobs:

build:

strategy:
matrix:
buildtype: [Release]
system_build: [ON,OFF]
include:
- system_build: ON
build_name: "all"
- system_build: OFF
build_name: "solver"

runs-on: ubuntu-latest
container: 'centos:7'

steps:
- uses: actions/checkout@v2

- name: Get release
id: get_release
uses: bruceadams/[email protected]

- name: Install libraries
run: |
yum update -y
yum install -y git epel-release redhat-lsb-core autoconf automake libtool gtk2-devel gcc gcc-c++ make centos-release-scl scl-utils
yum install -y cmake3 devtoolset-7
- name: Configure and build
run: |
source /opt/rh/devtoolset-7/enable
cmake3 -B _build -S . -DBUILD_not_system=ON -DBUILD_system=${{ matrix.system_build }} -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }} -DDEPS_INSTALL_DIR=rte-antares-deps-${{ matrix.buildtype }}
- name: Create archive
run: |
tar cvfh rte-antares-deps-centos7-${{ matrix.buildtype }}-${{ matrix.build_name }}.tar.gz rte-antares-deps-${{ matrix.buildtype }}
- name: Upload .deb
uses: actions/[email protected]
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: rte-antares-deps-centos7-${{ matrix.buildtype }}-${{ matrix.build_name }}.tar.gz
asset_name: rte-antares-deps-centos7-${{ matrix.buildtype }}-${{ matrix.build_name }}.tar.gz
asset_content_type: application/gzip

0 comments on commit 05a16cf

Please sign in to comment.