Skip to content

Commit

Permalink
gha update
Browse files Browse the repository at this point in the history
  • Loading branch information
mdavidsaver committed Nov 5, 2024
1 parent dfd568e commit fe6ff93
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 70 deletions.
6 changes: 6 additions & 0 deletions .ci-local/disable-fortify.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/env python

with open('configure/CONFIG_SITE', 'wa') as F:
F.write('''
OP_SYS_CPPFLAGS += -U_FORTIFY_SOURCE
''')
8 changes: 8 additions & 0 deletions .ci-local/nofortify.set
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# EPICS Base
BASE_DIRNAME=base
BASE_REPONAME=epics-base
BASE_REPOOWNER=epics-base
BASE_VARNAME=EPICS_BASE
BASE_RECURSIVE=no

BASE_HOOKS=.ci-local/disable-fortify.py
120 changes: 54 additions & 66 deletions .github/workflows/ci-scripts-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
runs-on: ${{ matrix.os }}
# Set environment variables from matrix parameters
env:
SET: ${{ matrix.set || 'defaults' }}
CMP: ${{ matrix.cmp }}
BCFG: ${{ matrix.configuration }}
BASE: ${{ matrix.base }}
Expand Down Expand Up @@ -104,25 +105,31 @@ jobs:
cmp: gcc
configuration: default
base: "7.0"
libevent: "release-2.0.22-stable"
libevent: "release-2.1.12-stable"

- name: Native Linux with 7.0.2
os: ubuntu-latest
cmp: gcc
configuration: default
set: "nofortify"
base: "R7.0.2"
extra: "CMD_CPPFLAGS=\"-U_FORTIFY_SOURCE\""

- name: Native Linux with 3.15
os: ubuntu-latest
cmp: gcc
configuration: default
set: "nofortify"
base: "3.15"
extra: "CMD_CPPFLAGS=\"-U_FORTIFY_SOURCE\""

- name: Native Linux with 3.14
os: ubuntu-latest
cmp: gcc
configuration: default
set: "nofortify"
base: "3.14"
extra: "CMD_CPPFLAGS=\"-U_FORTIFY_SOURCE\""

- name: OSX
os: macos-latest
Expand All @@ -145,13 +152,13 @@ jobs:
extra: "CMD_CXXFLAGS=-analysis"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: "apt-get install"
run: |
sudo apt-get update
sudo apt-get -y install g++-mingw-w64-x86-64 cmake gdb qemu-system-x86
sudo apt-get -y install libreadline-dev g++-mingw-w64-x86-64 cmake gdb qemu-system-x86
if: runner.os == 'Linux'
- name: Automatic core dumper analysis
uses: mdavidsaver/ci-core-dumper@master
Expand Down Expand Up @@ -210,25 +217,19 @@ jobs:
docker:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
env:
CMP: ${{ matrix.cmp }}
BCFG: ${{ matrix.configuration }}
BASE: ${{ matrix.base }}
LIBEVENT_TAG: ${{ matrix.libevent }}
EXTRA: ${{ matrix.extra }}
VV: "1"
# The Node version was updated to Node20 in 'checkout', which breaks stuff
# This allows the use of the "unsecure" Node16
# THIS IS VERY MUCH A TEMPORARY FIX AND WILL STOP WORKING IN THE FUTURE
# https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

strategy:
fail-fast: false
matrix:
include:
- name: Linux centos 7
- name: Linux CentOS 7
image: centos:7
cmp: gcc
configuration: default
Expand All @@ -241,61 +242,48 @@ jobs:
base: "7.0"

steps:
- name: "Build newer Git"
# actions/checkout@v2 wants git >=2.18
# centos:7 has 1.8
if: matrix.image=='centos:7'
# By default, Centos 7 uses mirrorlist.centos.org for yum
# mirrorlist.centos.org no longer exists (as of 1st July 2024), so need to update repolist
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
yum -y install curl make gcc curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-ExtUtils-MakeMaker
curl https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.29.0.tar.gz | tar -xz
cd git-*
make -j2 prefix=/usr/local all
make prefix=/usr/local install
cd ..
rm -rf git-*
type -a git
git --version
- name: "Redhat setup"
run: |
dnfyum() {
dnf -y "$@" || yum -y "$@"
return $?
}
dnfyum install python3 gdb make perl gcc-c++ glibc-devel readline-devel ncurses-devel perl-devel libevent-devel
git --version || dnfyum install git
# rather than just bite the bullet and link python3 -> python,
# people would rather just break all existing scripts...
[ -e /usr/bin/python ] || ln -sf /usr/bin/python3 /usr/bin/python
python --version
- uses: actions/checkout@v3
with:
submodules: true
- name: Automatic core dumper analysis
uses: mdavidsaver/ci-core-dumper@master
if: matrix.image!='centos:7'
- name: Automatic core dumper analysis
uses: mdavidsaver/ci-core-dumper@node16
if: matrix.image=='centos:7'
- name: Prepare and compile dependencies
run: python .ci/cue.py prepare
- name: Build main module
run: python .ci/cue.py build
- name: Host info
run: python .ci/cue.py --add-path "{TOP}/bin/{EPICS_HOST_ARCH}" exec pvxinfo -D
- name: Run main module tests
run: python -m ci_core_dumper exec python .ci/cue.py test
- name: Collect and show test results
run: python .ci/cue.py test-results
- name: CDT Check
run: ./.ci-local/cdt-check.sh
- name: Upload tapfiles Artifact
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: tapfiles ${{ matrix.name }}
path: '**/O.*/*.tap'

- name: Run...
run: |
env > env.list
cat <<EOF > runit.sh
#!/bin/sh
set -e -x
cd /io
id
if [ "${{ matrix.image }}" = "centos:7" ]
then
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
yum -y install epel-release
alias dnf=yum
fi
dnf -y install \
curl make gcc curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-ExtUtils-MakeMaker \
python3 gdb make perl gcc-c++ glibc-devel readline-devel ncurses-devel perl-devel libevent-devel \
sudo re2c git
# fake out cue.py
ln -s /bin/true /usr/bin/apt-get
# quiet warnings spam from perl
export LANG=C
python3 --version
python3 .ci/cue.py prepare
python3 .ci/cue.py build
python3 .ci/cue.py -T 15M test
python3 .ci/cue.py test-results
EOF
chmod +x runit.sh
docker run --rm --quiet \
--pull=always \
--env-file env.list \
-v `pwd`:/io \
${{ matrix.image }} \
/io/runit.sh
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Apt
run: |
sudo apt-get update
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
piparch: win_amd64

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Automatic core dumper analysis
Expand Down Expand Up @@ -317,14 +317,15 @@ jobs:
pre: linux32

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup native python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python || '3.7' }}
# used to run twine for uploads
python-version: '3.11'
#architecture: x64

- name: Native Prep/Info
Expand Down

0 comments on commit fe6ff93

Please sign in to comment.