From 51b52a8c27cdaca172e62d486e183b0cfc15f420 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Sat, 21 Dec 2024 19:24:35 +0000 Subject: [PATCH] wip --- .github/actions/setup-apt/action.yml | 38 +++++++++++++++++++ .../action.yml => setup-apt/action.yml~} | 0 .github/actions/setup-os/action.yml | 4 +- .../{setup-al => setup-yum}/action.yml | 5 +-- .github/workflows/bench_ec2_reusable.yml | 2 +- .github/workflows/ci.yml | 29 +++++++------- .github/workflows/ci_ec2_reusable.yml | 36 +++++++++--------- 7 files changed, 76 insertions(+), 38 deletions(-) create mode 100644 .github/actions/setup-apt/action.yml rename .github/actions/{setup-ubuntu/action.yml => setup-apt/action.yml~} (100%) rename .github/actions/{setup-al => setup-yum}/action.yml (89%) diff --git a/.github/actions/setup-apt/action.yml b/.github/actions/setup-apt/action.yml new file mode 100644 index 000000000..a4348deba --- /dev/null +++ b/.github/actions/setup-apt/action.yml @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: Apache-2.0 + +name: Dependencies (apt) +description: Install dependencies via apt + +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" diff --git a/.github/actions/setup-ubuntu/action.yml b/.github/actions/setup-apt/action.yml~ similarity index 100% rename from .github/actions/setup-ubuntu/action.yml rename to .github/actions/setup-apt/action.yml~ diff --git a/.github/actions/setup-os/action.yml b/.github/actions/setup-os/action.yml index 1f9243fab..864887d93 100644 --- a/.github/actions/setup-os/action.yml +++ b/.github/actions/setup-os/action.yml @@ -25,13 +25,13 @@ runs: fi - name: Setup via yum if: ${{ env.PKG == 'yum' }} - uses: ./.github/actions/setup-ubuntu + uses: ./.github/actions/setup-yum with: packages: ${{ inputs.packages }} sudo: ${{ inputs.sudo }} - name: Setup via apt if: ${{ env.PKG == 'apt' }} - uses: ./.github/actions/setup-ubuntu + uses: ./.github/actions/setup-apt with: packages: ${{ inputs.packages }} sudo: ${{ inputs.sudo }} diff --git a/.github/actions/setup-al/action.yml b/.github/actions/setup-yum/action.yml similarity index 89% rename from .github/actions/setup-al/action.yml rename to .github/actions/setup-yum/action.yml index e58884f73..13389694b 100644 --- a/.github/actions/setup-al/action.yml +++ b/.github/actions/setup-yum/action.yml @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 -name: Setup Amazon Linux -description: Setup Amazon Linux +name: Dependencies (yum) +description: Install dependencies via yum inputs: packages: @@ -16,7 +16,6 @@ runs: using: composite steps: - name: Install base packages - - name: Update package repository shell: bash run: | ${{ inputs.sudo }} yum install make git python3-venv -y diff --git a/.github/workflows/bench_ec2_reusable.yml b/.github/workflows/bench_ec2_reusable.yml index 7da9c19f7..9205c85c8 100644 --- a/.github/workflows/bench_ec2_reusable.yml +++ b/.github/workflows/bench_ec2_reusable.yml @@ -165,7 +165,7 @@ jobs: if: ${{ inputs.compiler != '' }} steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: ./.github/actions/setup-ubuntu + - uses: ./.github/actions/setup-apt with: packages: ${{ inputs.additional_packages }} - name: Set compiler diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d72bd135..6979450c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,7 @@ jobs: OPT=0 make quickcheck >/dev/null make clean >/dev/null OPT=1 make quickcheck >/dev/null - - uses: ./.github/actions/setup-ubuntu + - uses: ./.github/actions/setup-apt - name: tests func run: | ./scripts/tests func @@ -93,7 +93,7 @@ jobs: OPT=0 CPPFLAGS=-std=c90 make quickcheck >/dev/null make clean >/dev/null OPT=1 CPPFLAGS=-std=c90 make quickcheck >/dev/null - - uses: ./.github/actions/setup-ubuntu + - uses: ./.github/actions/setup-apt - name: tests func run: | CPPFLAGS="-std=c90" ./scripts/tests func @@ -436,20 +436,10 @@ jobs: # secrets: inherit ec2_compatibilitytests: strategy: + max-parallel: 8 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-20.04-aarch:base - id: amazonlinux-2-aarch:base - id: amazonlinux-2-aarch:gcc-7x - id: amazonlinux-2-aarch:clang-7x @@ -457,7 +447,18 @@ jobs: - id: amazonlinux-2023-aarch:gcc-11x - id: amazonlinux-2023-aarch:clang-15x - id: amazonlinux-2023-aarch:clang-15x-sanitizer - - id: amazonlinux-2023-aarch:cryptofuzz + # - id: amazonlinux-2023-aarch:cryptofuzz Not yet supported + - 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 name: Compatibility tests (${{ matrix.container.id }}) # needs: [ec2_functests] permissions: diff --git a/.github/workflows/ci_ec2_reusable.yml b/.github/workflows/ci_ec2_reusable.yml index 8cc80ca05..af5f6fac8 100644 --- a/.github/workflows/ci_ec2_reusable.yml +++ b/.github/workflows/ci_ec2_reusable.yml @@ -138,27 +138,27 @@ jobs: 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 + # 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 + # python3 --version - echo "$(pwd)/venv/bin/" >> "$GITHUB_PATH" + # echo "$(pwd)/venv/bin/" >> "$GITHUB_PATH" - # - uses: ./.github/actions/setup-os - # with: - # sudo: "" + - uses: ./.github/actions/setup-os + with: + sudo: "" - name: make quickcheck run: | OPT=0 make quickcheck >/dev/null