Skip to content

Commit 024705e

Browse files
committed
[CI] Use the new github repositories for SIF files
1 parent c30845b commit 024705e

2 files changed

Lines changed: 38 additions & 16 deletions

File tree

.github/workflows/sif_database.yml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ on:
55
- master
66
pull_request:
77
types: [opened, synchronize, reopened]
8+
89
jobs:
910
build:
1011
name: Verify SIF files and CLASSF.DB consistency
1112
runs-on: ubuntu-latest
13+
1214
steps:
1315
- name: Checkout SIFDecode
1416
uses: actions/checkout@v4
@@ -17,12 +19,12 @@ jobs:
1719
shell: bash
1820
run: |
1921
cd $GITHUB_WORKSPACE/../
20-
git clone https://bitbucket.org/optrove/sif
22+
git clone https://github.com/ralna/SIF.git
2123
2224
- name: Check entries in CLASSF.DB and SIF files
2325
shell: bash
2426
run: |
25-
cd $GITHUB_WORKSPACE/../sif
27+
cd $GITHUB_WORKSPACE/../SIF
2628
2729
# Read the CLASSF.DB file and store the problem names in an array
2830
mapfile -t db_problems < <(awk '{print $1}' CLASSF.DB)
@@ -31,18 +33,34 @@ jobs:
3133
missing_sif_count=0
3234
missing_db_count=0
3335
34-
# Check if each SIF file has an entry in CLASSF.DB
36+
# Collect all available problems from:
37+
# *.SIF
38+
# *.SIF.bz2
39+
declare -A sif_problems
40+
41+
shopt -s nullglob
42+
3543
for file in *.SIF; do
36-
problem_name="${file%.SIF}"
44+
sif_problems["${file%.SIF}"]=1
45+
done
46+
47+
for file in *.SIF.bz2; do
48+
sif_problems["${file%.SIF.bz2}"]=1
49+
done
50+
51+
# Check that every SIF/SIF.bz2 file is listed in CLASSF.DB
52+
for problem_name in "${!sif_problems[@]}"; do
3753
if [[ " ${db_problems[*]} " != *" ${problem_name} "* ]]; then
3854
echo "${problem_name} is ABSENT from CLASSF.DB"
3955
missing_db_count=$((missing_db_count + 1))
4056
fi
4157
done
4258
43-
# Check if each entry in CLASSF.DB has a corresponding SIF file
59+
# Check that every CLASSF.DB entry has either:
60+
# problem.SIF
61+
# problem.SIF.bz2
4462
for problem in "${db_problems[@]}"; do
45-
if [[ ! -f "${problem}.SIF" ]]; then
63+
if [[ ! -f "${problem}.SIF" && ! -f "${problem}.SIF.bz2" ]]; then
4664
echo "SIF file for ${problem} is MISSING"
4765
missing_sif_count=$((missing_sif_count + 1))
4866
fi
@@ -51,7 +69,6 @@ jobs:
5169
echo "Total number of SIF files without DB entries: ${missing_db_count}"
5270
echo "Total number of DB entries without SIF files: ${missing_sif_count}"
5371
54-
# Exit with error if any issues were found
5572
if [ "${missing_db_count}" -ne 0 ] || [ "${missing_sif_count}" -ne 0 ]; then
5673
echo "Error: Mismatch between CLASSF.DB entries and SIF files"
5774
exit 1

.github/workflows/sifdecoder.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
matrix:
1414
os: [ubuntu-latest, macos-latest]
1515
version: ['12']
16-
problems: ['sifcollection', 'maros-meszaros', 'netlib-lp']
16+
problems: ['sif', 'maros-meszaros', 'netlib-lp']
1717
precision: ['single', 'double', 'quadruple']
1818
runs-on: ${{ matrix.os }}
1919
steps:
@@ -43,29 +43,34 @@ jobs:
4343
shell: bash
4444
run: |
4545
cd $GITHUB_WORKSPACE/../
46-
if [[ "${{ matrix.problems }}" == "sifcollection" ]]; then
47-
git clone https://bitbucket.org/optrove/sif
46+
if [[ "${{ matrix.problems }}" == "sif" ]]; then
47+
git clone https://github.com/ralna/SIF.git
4848
fi
4949
if [[ "${{ matrix.problems }}" == "maros-meszaros" ]]; then
50-
git clone https://bitbucket.org/optrove/maros-meszaros
51-
mv maros-meszaros sif
50+
git clone https://github.com/ralna/maros-meszaros
51+
mv maros-meszaros SIF
5252
fi
5353
if [[ "${{ matrix.problems }}" == "netlib-lp" ]]; then
54-
git clone https://bitbucket.org/optrove/netlib-lp
55-
mv netlib-lp sif
54+
git clone https://github.com/ralna/netlib-lp
55+
mv netlib-lp SIF
5656
fi
5757
5858
- name: SIFDecode
5959
shell: bash
6060
run: |
6161
meson setup builddir --buildtype=debug -Ddefault_library=static
6262
meson compile -C builddir
63-
cp builddir/sifdecoder $GITHUB_WORKSPACE/../sif
63+
cp builddir/sifdecoder $GITHUB_WORKSPACE/../SIF
6464
6565
- name: Decode the SIF files
6666
shell: bash
6767
run: |
68-
cd $GITHUB_WORKSPACE/../sif
68+
cd $GITHUB_WORKSPACE/../SIF
69+
for file in *.SIF.bz2; do
70+
if [ -f "$file" ]; then
71+
bunzip2 -k "$file"
72+
fi
73+
done
6974
for file in *.SIF; do
7075
if [ -f "$file" ]; then
7176
echo "Processing $file"

0 commit comments

Comments
 (0)