Skip to content

Fix the other CentOS CI #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 13 additions & 65 deletions .github/workflows/full-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,76 +64,24 @@ jobs:
cpp_centos7:
name: Build C++ CentOS7
runs-on: ubuntu-latest
container: 'centos:centos7'
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
- name: Update mirrors
run: |
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo

- name: Update Dependencies
run: |
yum update -y

- name: Install Dependencies 1
run: |
yum install -y epel-release

- name: Install Dependencies 2
run: |
yum install -y git redhat-lsb-core make wget centos-release-scl scl-utils

- name: Update mirrors again because why not
run: |
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo

- name: Install Dependencies 3
run: |
yum install -y devtoolset-9

- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.22.x'

- name: Checkout sources
uses: actions/checkout@v3

- name: Download Boost-release
uses: dsaltares/fetch-gh-release-asset@a40c8b4a0471f9ab81bdf73a010f74cc51476ad4 # v1.1.1
with:
repo: 'ARnDOSrte/Boost'
file: 'boost_1_73_0.zip'
target: 'boost_1_73_0.zip'
token: ${{ secrets.GITHUB_TOKEN }}

- name: Unzip Boost
run: unzip boost_1_73_0.zip
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Configure 3rd parties
- name: Build the Docker image
run: |
source /opt/rh/devtoolset-9/enable
cmake -S $GITHUB_WORKSPACE/metrix-simulator/external -B $GITHUB_WORKSPACE/metrix-simulator/build/external
docker build -t centos7withcmake:latest $GITHUB_WORKSPACE --file $GITHUB_WORKSPACE/.github/workflows/docker/Dockerfile

- name: Build 3rd parties
- name: Run build steps in Docker container
run: |
cmake --build $GITHUB_WORKSPACE/metrix-simulator/build/external --parallel 2

- name: Configure CMake
run: |
source /opt/rh/devtoolset-9/enable
cmake -S $GITHUB_WORKSPACE/metrix-simulator -Wno-dev -DCMAKE_BUILD_TYPE=Release -DBoost_ROOT=$GITHUB_WORKSPACE/__w/Boost/Boost/boost_1_73_0/installBoost -DBoost_INCLUDE_DIR=$GITHUB_WORKSPACE/__w/Boost/Boost/boost_1_73_0/installBoost -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/metrix-simulator/build/install -B $GITHUB_WORKSPACE/metrix-simulator/build

- name: Build
run: cmake --build $GITHUB_WORKSPACE/metrix-simulator/build --target install --parallel 2

- name: Tests
run: cd $GITHUB_WORKSPACE/metrix-simulator/build && ctest -j2 --output-on-failure
docker run --name build_container -v $GITHUB_WORKSPACE:/workspace centos7withcmake:latest /bin/bash -c "
source /opt/rh/devtoolset-9/enable &&
cmake -S /workspace/metrix-simulator/external -B /workspace/metrix-simulator/build/external &&
cmake --build /workspace/metrix-simulator/build/external --parallel 2 &&
cmake -S /workspace/metrix-simulator -Wno-dev -DCMAKE_BUILD_TYPE=Release -DBoost_ROOT=/usr/local/src/__w/Boost/Boost/boost_1_73_0/installBoost -DBoost_INCLUDE_DIR=/usr/local/src/__w/Boost/Boost/boost_1_73_0/installBoost -DCMAKE_INSTALL_PREFIX=/workspace/metrix-simulator/build/install -B /workspace/metrix-simulator/build &&
cmake --build /workspace/metrix-simulator/build --target install --parallel 2 &&
cd /workspace/metrix-simulator/build && ctest -j2 --output-on-failure
"

cpp_oraclelinux8:
name: Build C++ Oracle Linux 8
Expand Down
80 changes: 14 additions & 66 deletions .github/workflows/release-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,76 +34,24 @@ jobs:
cpp_centos7:
name: Package C++ CentOS7
runs-on: ubuntu-latest
container: 'centos:centos7'
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
- name: Update mirrors
run: |
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo

- name: Update Dependencies
run: |
yum update -y

- name: Install Dependencies 1
run: |
yum install -y epel-release

- name: Install Dependencies 2
run: |
yum install -y git redhat-lsb-core make wget centos-release-scl scl-utils

- name: Update mirrors again because why not
run: |
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo

- name: Install Dependencies 3
run: |
yum install -y devtoolset-9

- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.22.x'

- name: Checkout sources
uses: actions/checkout@v3

- name: Download Boost-release
uses: dsaltares/fetch-gh-release-asset@a40c8b4a0471f9ab81bdf73a010f74cc51476ad4 # v1.1.1
with:
repo: 'ARnDOSrte/Boost'
file: 'boost_1_73_0.zip'
target: 'boost_1_73_0.zip'
token: ${{ secrets.GITHUB_TOKEN }}

- name: Unzip Boost
run: unzip boost_1_73_0.zip
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Configure 3rd parties
- name: Build the Docker image
run: |
source /opt/rh/devtoolset-9/enable
cmake -S $GITHUB_WORKSPACE/metrix-simulator/external -B $GITHUB_WORKSPACE/metrix-simulator/build/external
docker build -t centos7withcmake:latest $GITHUB_WORKSPACE --file $GITHUB_WORKSPACE/.github/workflows/docker/Dockerfile

- name: Build 3rd parties
- name: Run build steps in Docker container
run: |
cmake --build $GITHUB_WORKSPACE/metrix-simulator/build/external --parallel 2

- name: Configure CMake
run: |
source /opt/rh/devtoolset-9/enable
cmake -S $GITHUB_WORKSPACE/metrix-simulator -Wno-dev -DCMAKE_BUILD_TYPE=Release -DBoost_ROOT=$GITHUB_WORKSPACE/__w/Boost/Boost/boost_1_73_0/installBoost -DBoost_INCLUDE_DIR=$GITHUB_WORKSPACE/__w/Boost/Boost/boost_1_73_0/installBoost -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/metrix-simulator/build/install -B $GITHUB_WORKSPACE/metrix-simulator/build

- name: Build
run: cmake --build $GITHUB_WORKSPACE/metrix-simulator/build --target install --parallel 2

- name: Tests
run: cd $GITHUB_WORKSPACE/metrix-simulator/build && ctest -j2 --output-on-failure
docker run --name build_container -v $GITHUB_WORKSPACE:/workspace centos7withcmake:latest /bin/bash -c "
source /opt/rh/devtoolset-9/enable &&
cmake -S /workspace/metrix-simulator/external -B /workspace/metrix-simulator/build/external &&
cmake --build /workspace/metrix-simulator/build/external --parallel 2 &&
cmake -S /workspace/metrix-simulator -Wno-dev -DCMAKE_BUILD_TYPE=Release -DBoost_ROOT=/usr/local/src/__w/Boost/Boost/boost_1_73_0/installBoost -DBoost_INCLUDE_DIR=/usr/local/src/__w/Boost/Boost/boost_1_73_0/installBoost -DCMAKE_INSTALL_PREFIX=/workspace/metrix-simulator/build/install -B /workspace/metrix-simulator/build &&
cmake --build /workspace/metrix-simulator/build --target install --parallel 2 &&
cd /workspace/metrix-simulator/build && ctest -j2 --output-on-failure
"

- name: Prepare Metrix package
id: metrix-install
Expand All @@ -116,7 +64,7 @@ jobs:
echo "archive_path=$ARCHIVE_PATH" >> "$GITHUB_OUTPUT"

- name: Upload release package
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1 (nb: v0.1.15)
uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8 # v2.0.9
with:
files: ${{ steps.metrix-install.outputs.archive_path }}.zip

Expand Down
Loading