Skip to content

Commit

Permalink
230714.111918.CST use date +%-d to avoid the leading zero
Browse files Browse the repository at this point in the history
  • Loading branch information
zaikunzhang committed Jul 14, 2023
1 parent 93ef6bc commit 24eb141
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint_nagfor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
export PATH=$PATH:"~/local/bin"
source ~/local/bin/nag_licensing || (echo "\n\nNAG licensing failed.\n\n" && exit 2)
cd "$ROOT_DIR"/fortran/${{ matrix.solver }}
if [[ $(($(echo $(date +%d) | sed 's|^0||') % 2)) == 0 ]] ; then
if [[ $(($(date +%-d) % 2)) == 0 ]] ; then
bash ./flint -n --all
else
bash ./mlint -n --all
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stress_test_fortran.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
run: |
cd "$ROOT_DIR"/fortran/tests
export TESTDIM=${{ matrix.testdim }}
RK=$((2**($(date +%d) % 3 + 2)))
RK=$((2**($(date +%-d) % 3 + 2)))
echo "RK = " $RK
if [[ $RK==16 && dfrv == *${{ matrix.compiler }}* ]] ; then
echo "r16 test is skipped for compiler " ${{ matrix.compiler }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_absoft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
source "$AFDIR"/bin/absvars.sh
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH
# Use $(( )) rather than $(expr ). See https://unix.stackexchange.com/questions/63166/bash-e-exits-when-let-or-expr-evaluates-to-0
FFLAGS=-O$(($(date +%d) % 4))
FFLAGS=-O$(($(date +%-d) % 4))
FFLAGS=${FFLAGS/O0/g}
export FFLAGS
cd "$ROOT_DIR"/fortran/tests && make atest_${{ matrix.ikind }}.${{ matrix.solver }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_nagfor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
export PATH=$PATH:"~/local/bin"
source ~/local/bin/nag_licensing || echo "\n\nNAG licensing failed.\n\n"
# Use $(( )) rather than $(expr ). See https://unix.stackexchange.com/questions/63166/bash-e-exits-when-let-or-expr-evaluates-to-0
FFLAGS=-O$(($(date +%d) % 5))
FFLAGS=-O$(($(date +%-d) % 5))
FFLAGS=${FFLAGS/O0/g}
FFLAGS=${FFLAGS/O4/fast}
export FFLAGS
Expand Down

0 comments on commit 24eb141

Please sign in to comment.