diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml new file mode 100644 index 00000000..9d9cc194 --- /dev/null +++ b/.github/workflows/example.yml @@ -0,0 +1,24 @@ +name: Example + +on: + push: + paths: + - 'examples/**' + - '.github/workflows/example.yml' + +jobs: + + build: + name: Build library + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Compile example.c + run: | + cd examples + gcc -c -Wall -Werror -I ../include example.c + + + diff --git a/examples/example.c b/examples/example.c index 6ba512c8..7c811827 100644 --- a/examples/example.c +++ b/examples/example.c @@ -103,6 +103,7 @@ int main(void) { // Establish time arguments. jd_utc = julian_date(2008, 4, 24, 10.605); + jd_tt = jd_utc + ((double) leap_secs + 32.184) / 86400.0; jd_ut1 = jd_utc + ut1_utc / 86400.0; delta_t = get_ut1_to_tt(leap_secs, ut1_utc);