2626
2727jobs :
2828 package-tests :
29- name : Package tests
30- runs-on : ${{ matrix.os }}
29+ runs-on : ubuntu-latest
3130 timeout-minutes : 60
3231 strategy :
3332 fail-fast : false
3433 matrix :
3534 version :
36- - ' 1.10' # 1.10 = current LTS
37- os :
38- - ubuntu-latest
35+ - ' 1.10' # currently the LTS
3936 steps :
4037 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
41-
4238 - uses : julia-actions/setup-julia@4a12c5f801ca5ef0458bba44687563ef276522dd # v3.0.0
39+ with :
40+ persist-credentials : false
4341 with :
4442 version : ${{ matrix.version }}
45-
4643 - uses : julia-actions/cache@9a93c5fb3e9c1c20b60fc80a478cae53e38618a4 # v3.0.2
47-
4844 - name : Install dependencies
4945 run : julia --color=yes --project -e "using Pkg; Pkg.instantiate()"
50-
5146 - uses : julia-actions/julia-runtest@d60b785c6f2bdf4ebfb18b2b6f7d93b7dfb0efe3 # v1.11.4
5247
53- full-test :
54- name : Full test
48+ full-build-and-test :
5549 # This job takes a long time (1+ hours).
5650 # So we intentionally skip this job on PR runs.
5751 # But we still run this job on Merge Queue jobs.
58- if : github.event_name != 'pull_request'
52+ # if: github.event_name != 'pull_request' # TODO: Uncomment this line before merging the PR
5953 runs-on : ubuntu-latest
6054 timeout-minutes : 360
6155 strategy :
6256 fail-fast : false
63-
6457 steps :
6558 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
66-
6759 - uses : julia-actions/setup-julia@4a12c5f801ca5ef0458bba44687563ef276522dd # v3.0.0
60+ with :
61+ persist-credentials : false
6862 with :
6963 version : ' 1.10' # 1.10 = current LTS
70-
7164 - uses : julia-actions/cache@9a93c5fb3e9c1c20b60fc80a478cae53e38618a4 # v3.0.2
72-
7365 - name : Install dependencies
7466 run : julia --color=yes --project -e "using Pkg; Pkg.instantiate()"
75-
76- - run : rm -f versions.json
77-
78- - name : Build versions.json
67+ - name : Cleanup before we build
7968 run : |
80- using VersionsJSONUtil
81-
82- VersionsJSONUtil.main("versions.json")
83- shell : julia --project {0}
84-
69+ make clean
70+ make nuke
71+ make purge_download_cache_dir
72+ - name : Download the old versions.json, so we can re-use it and build on top of it
73+ run : curl -LO https://julialang-s3.julialang.org/bin/versions.json
74+ - name : Build versions.json
75+ run : make build
76+ env :
77+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Used to authenticate to GitHub API to get list of tags
78+ - name : Run the post-build tests
79+ run : make test-full
80+ - name : Install NPM deps
81+ run : make _npm_ci
8582 - name : Validate versions.json against schema
86- run : npx -p ajv-cli@3.3.0 ajv -s schema.json -d versions.json
87-
88- - run : julia --project test/more_tests.jl versions.json
89-
83+ run : make check-schema
9084 - name : Upload versions.json as workflow artifact
9185 uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
9286 with :
@@ -95,31 +89,29 @@ jobs:
9589 if-no-files-found : error
9690
9791 upload-to-s3 :
98- needs : [package-tests, full-test]
92+ needs :
93+ - package-tests
94+ - full-build-and-test
9995 if : github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main'
10096 runs-on : ubuntu-latest
10197 timeout-minutes : 60
102-
10398 steps :
10499 - name : Download versions.json from previous job
105100 uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
106101 with :
107102 name : versions
108-
109103 - name : Configure AWS credentials
110104 uses : aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # 6.1.0
111105 with :
112106 aws-access-key-id : ${{ secrets.AWS_DEPLOY_ACCESS_KEY_ID }}
113107 aws-secret-access-key : ${{ secrets.AWS_DEPLOY_SECRET_ACCESS_KEY }}
114108 aws-region : ${{ env.aws_region }}
115-
116109 - name : Upload versions.json to S3
117110 run : aws s3 cp versions.json s3://${{ env.s3_bucket }}/bin/versions.json --acl public-read --no-progress
118-
119- - name : Purge cache
111+ - name : Purge Fastly cache (Fastly sits in front of S3)
120112 run : curl -X PURGE https://julialang-s3.julialang.org/bin/versions.json
121113
122- test-current-s3 :
114+ test-current-s3-allowed-to-fail :
123115 # We intentionally do not make this job a "required status check" on PRs.
124116 # Because if the currently deployed `versions.json` on S3 is already broken,
125117 # then this job will fail, which would block us from merging a PR with fixes.
@@ -142,4 +134,4 @@ jobs:
142134 - name : Download the current versions.json from S3
143135 run : curl -LO https://julialang-s3.julialang.org/bin/versions.json
144136 - name : Run the post-build tests on the versions.json that we downloaded from S3
145- run : julia --project test/more_tests .jl versions.json
137+ run : julia --project test/post_build .jl versions.json full
0 commit comments