Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
hanno-becker committed Dec 21, 2024
1 parent 703bddf commit 2ae4cbb
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 14 deletions.
35 changes: 35 additions & 0 deletions .github/actions/setup-al/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# SPDX-License-Identifier: Apache-2.0

name: Setup Amazon Linux
description: Setup Amazon Linux

inputs:
packages:
description: Space-separated list of additional packages to install
required: false
default: ''
sudo:
required: false
default: 'sudo'

runs:
using: composite
steps:
- name: Install base packages
- name: Update package repository
shell: bash
run: |
${{ inputs.sudo }} yum install make git python3-venv -y
${{ inputs.sudo }} pip3 install virtualenv
- name: Install additional packages
if: ${{ inputs.packages != ''}}
shell: bash
run: |
${{ inputs.sudo }} yum install ${{ inputs.packages }} -y
- name: Setup Python venv
shell: bash
run: |
virtualenv venv
source venv/bin/activate
python3 -m pip install -r requirements.txt
echo "$(pwd)/venv/bin/" >> "$GITHUB_PATH"
37 changes: 37 additions & 0 deletions .github/actions/setup-os/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# SPDX-License-Identifier: Apache-2.0

name: Setup OS
description: Setup OS

inputs:
packages:
description: Space-separated list of additional packages to install
required: false
default: ''
sudo:
required: false
default: 'sudo'

runs:
using: composite
steps:
- name: Detect OS
shell: bash
run: |
if (which yum 2>&1 > /dev/null); then
echo PKG="yum" >> $GITHUB_ENV
elif (which apt 2>&1 > /dev/null); then
echo PKG="apt" >> $GITHUB_ENV
fi
- name: Setup via yum
if: ${{ env.PKG == 'yum' }}
uses: ./.github/actions/setup-ubuntu
with:
packages: ${{ inputs.packages }}
sudo: ${{ inputs.sudo }}
- name: Setup via apt
if: ${{ env.PKG == 'apt' }}
uses: ./.github/actions/setup-ubuntu
with:
packages: ${{ inputs.packages }}
sudo: ${{ inputs.sudo }}
38 changes: 38 additions & 0 deletions .github/actions/setup-os/action.yml~
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# SPDX-License-Identifier: Apache-2.0

name: Setup OS
description: Setup OS

inputs:
packages:
description: Space-separated list of additional packages to install
required: false
default: ''
sudo:
required: false
default: 'sudo'

runs:
using: composite
steps:
- name: Update package repository
shell: bash
run: |
${{ inputs.sudo }} apt-get update
- name: Install base packages
shell: bash
run: |
${{ inputs.sudo }} apt-get install python3-venv python3-pip make -y
- name: Install additional packages
if: ${{ inputs.packages != ''}}
shell: bash
run: |
${{ inputs.sudo }} apt-get install ${{ inputs.packages }} -y
- name: Setup Python venv
shell: bash
run: |
python3 -m venv venv
source venv/bin/activate
python3 -m pip install -r requirements.txt
deactivate
echo "$(pwd)/venv/bin/" >> "$GITHUB_PATH"
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -439,16 +439,16 @@ jobs:
fail-fast: false
matrix:
container:
- id: ubuntu-22.04-aarch:gcc-12x
- id: ubuntu-22.04-aarch:gcc-11x
- id: ubuntu-20.04-aarch:gcc-8x
- id: ubuntu-20.04-aarch:gcc-7x
- id: ubuntu-20.04-aarch:clang-9x
- id: ubuntu-20.04-aarch:clang-8x
- id: ubuntu-20.04-aarch:clang-7x-bm-framework
- id: ubuntu-20.04-aarch:clang-7x
- id: ubuntu-20.04-aarch:clang-10x
- id: ubuntu-22.04-aarch:base
# - id: ubuntu-22.04-aarch:gcc-12x
# - id: ubuntu-22.04-aarch:gcc-11x
# - id: ubuntu-20.04-aarch:gcc-8x
# - id: ubuntu-20.04-aarch:gcc-7x
# - id: ubuntu-20.04-aarch:clang-9x
# - id: ubuntu-20.04-aarch:clang-8x
# - id: ubuntu-20.04-aarch:clang-7x-bm-framework
# - id: ubuntu-20.04-aarch:clang-7x
# - id: ubuntu-20.04-aarch:clang-10x
# - id: ubuntu-22.04-aarch:base
- id: ubuntu-20.04-aarch:base
- id: amazonlinux-2-aarch:base
- id: amazonlinux-2-aarch:gcc-7x
Expand Down
40 changes: 36 additions & 4 deletions .github/workflows/ci_ec2_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,42 @@ jobs:
container:
localhost:5000/${{ inputs.container }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/setup-ubuntu
with:
sudo: ""
- name: Setup system
shell: bash
run: |
if which yum; then
yum install git -y
elif which apt; then
apt update
apt install git -y
fi
git init
git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY
git fetch origin --depth 1 $GITHUB_SHA
git checkout FETCH_HEAD
if which yum; then
yum install make git python3-pip -y
pip3 install virtualenv
virtualenv venv
source venv/bin/activate
python3 -m pip install -r requirements.txt
elif which apt; then
apt update
apt install make python3-pip python3-venv -y
python3 -m venv venv
source venv/bin/activate
python3 -m pip install -r requirements.txt
fi
python3 --version
echo "$(pwd)/venv/bin/" >> "$GITHUB_PATH"
# - uses: ./.github/actions/setup-os
# with:
# sudo: ""
- name: make quickcheck
run: |
OPT=0 make quickcheck >/dev/null
Expand Down

0 comments on commit 2ae4cbb

Please sign in to comment.