Drop legacy code #123
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Tests | |
on: [push, pull_request] | |
env: | |
COPR_REPO: ${{ vars.COPR_REPO || '@pki/master' }} | |
jobs: | |
build-test: | |
name: Build Test | |
runs-on: ubuntu-latest | |
container: ${{ vars.BASE_IMAGE || 'registry.fedoraproject.org/fedora:latest' }} | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
dnf install -y dnf-plugins-core moby-engine maven rpm-build | |
if [ -n "$COPR_REPO" ]; then dnf copr enable -y $COPR_REPO; fi | |
dnf builddep -y --skip-unavailable --spec ldapjdk.spec | |
- name: Install JSS packages from jss-dist | |
run: | | |
docker pull quay.io/dogtagpki/jss-dist:latest | |
docker create --name=jss-dist quay.io/dogtagpki/jss-dist:latest | |
docker cp jss-dist:/root/RPMS /tmp/RPMS/ | |
docker rm -f jss-dist | |
dnf localinstall -y /tmp/RPMS/* | |
- name: Build with Ant | |
run: | | |
./build.sh | |
- name: Install JSS into local Maven repo | |
run: | | |
# get JSS <major>.<minor>.<update> version | |
JSS_VERSION=$(rpm -q --qf "%{version}" dogtag-jss) | |
mvn install:install-file \ | |
-Dfile=/usr/lib/java/jss.jar \ | |
-DgroupId=org.dogtagpki.jss \ | |
-DartifactId=jss-base \ | |
-Dversion=$JSS_VERSION-SNAPSHOT \ | |
-Dpackaging=jar \ | |
-DgeneratePom=true | |
- name: Build with Maven | |
run: | | |
mvn package | |
- name: Compare ldapjdk.jar | |
run: | | |
jar tvf ~/build/ldapjdk/packages/ldapjdk.jar | awk '{print $8;}' | sort | tee ldapjdk.ant | |
jar tvf java-sdk/ldapjdk/target/ldapjdk.jar | awk '{print $8;}' | grep -v '^META-INF/maven/' | sort | tee ldapjdk.maven | |
diff ldapjdk.ant ldapjdk.maven | |
- name: Compare ldapbeans.jar | |
run: | | |
jar tvf ~/build/ldapjdk/packages/ldapbeans.jar | awk '{print $8;}' | sort | tee ldapbeans.ant | |
jar tvf java-sdk/ldapbeans/target/ldapbeans.jar | awk '{print $8;}' | grep -v '^META-INF/maven/' | sort | tee ldapbeans.maven | |
diff ldapbeans.ant ldapbeans.maven | |
- name: Compare ldapfilter.jar | |
run: | | |
jar tvf ~/build/ldapjdk/packages/ldapfilt.jar | awk '{print $8;}' | sort | tee ldapfilt.ant | |
jar tvf java-sdk/ldapfilter/target/ldapfilter.jar | awk '{print $8;}' | grep -v '^META-INF/maven/' | sort | tee ldapfilt.maven | |
diff ldapfilt.ant ldapfilt.maven | |
- name: Compare ldapsp.jar | |
run: | | |
jar tvf ~/build/ldapjdk/packages/ldapsp.jar | awk '{print $8;}' | sort | tee ldapsp.ant | |
jar tvf java-sdk/ldapsp/target/ldapsp.jar | awk '{print $8;}' | grep -v '^META-INF/maven/' | sort | tee ldapsp.maven | |
diff ldapsp.ant ldapsp.maven | |
- name: Compare ldaptools.jar | |
run: | | |
jar tvf ~/build/ldapjdk/packages/ldaptools.jar | awk '{print $8;}' | sort | tee ldaptools.ant | |
jar tvf java-sdk/ldaptools/target/ldaptools.jar | awk '{print $8;}' | grep -v '^META-INF/maven/' | sort | tee ldaptools.maven | |
diff ldaptools.ant ldaptools.maven | |
- name: Build LDAP JDK RPMs with Ant | |
run: | | |
./build.sh --work-dir=build rpm | |
- name: Install RPMInspect | |
run: | | |
dnf install -y dnf-plugins-core | |
dnf copr enable -y copr.fedorainfracloud.org/dcantrell/rpminspect | |
dnf install -y rpminspect rpminspect-data-fedora | |
- name: Run RPMInspect on SRPM and RPMs | |
run: ./tests/bin/rpminspect.sh |