@@ -19,55 +19,21 @@ jobs:
1919 finalize :
2020 timeout-minutes : 10
2121 needs :
22- - unit-tests
23- - example-pull-gcr
22+ - test-htc
2423 # Important: the next line MUST be `if: always()`.
2524 # Do not change that line.
2625 # That line is necessary to make sure that this job runs even if tests fail.
2726 if : always()
2827 runs-on : ubuntu-latest
2928 steps :
3029 - run : |
31- echo unit-tests: ${{ needs.unit-tests.result }}
32- echo example-pull-gcr: ${{ needs.example-pull-gcr.result }}
30+ echo test-htc: ${{ needs.test-htc.result }}
3331 - run : exit 1
3432 # The last line must NOT end with ||
3533 # All other lines MUST end with ||
3634 if : |
37- (needs.unit-tests.result != 'success') ||
38- (needs.example-pull-gcr.result != 'success')
39- unit-tests :
40- runs-on : ubuntu-latest
41- timeout-minutes : 20
42- strategy :
43- fail-fast : false
44- matrix :
45- version :
46- - ' 1.2' # minimum Julia version supported in Project.toml
47- - ' 1.6' # previous LTS
48- - ' 1.10' # current LTS
49- - ' 1' # automatically expands to the latest stable 1.x release of Julia
50- steps :
51- - uses : actions/checkout@v4
52- with :
53- persist-credentials : false
54- - uses : julia-actions/setup-julia@v2
55- with :
56- version : ${{ matrix.version }}
57- - uses : julia-actions/julia-runtest@v1
58- - run : find . -type f -name '*.cov'
59- # - run: find . -type f -name '*.c ov' -exec cat {} \;
60- - uses : julia-actions/julia-processcoverage@v1
61- - uses : codecov/codecov-action@v5
62- with :
63- files : lcov.info
64- token : ${{ secrets.CODECOV_TOKEN }}
65- # If this PR is from a fork, then do NOT fail CI if the Codecov upload errors.
66- # If this PR is NOT from a fork, then DO fail CI if the Codecov upload errors.
67- # If this is not a PR, then DO fail CI if the Codecov upload errors.
68- fail_ci_if_error : ${{ github.event_name != 'pull_request' || github.repository == github.event.pull_request.head.repo.full_name }}
69- test-slurm :
70- if : false
35+ (needs.test-htc.result != 'success')
36+ test-htc :
7137 runs-on : ubuntu-latest
7238 timeout-minutes : 20
7339 strategy :
@@ -76,82 +42,47 @@ jobs:
7642 version :
7743 # Please note: You must specify the full Julia version number (major.minor.patch).
7844 # This is because the value here will be directly interpolated into a download URL.
79- # - '1.2.0 ' # minimum Julia version supported in Project.toml
45+ - ' 1.0.5 ' # minimum Julia version supported in Project.toml
8046 - ' 1.6.7' # previous LTS
8147 - ' 1.10.7' # current LTS
8248 - ' 1.11.2' # currently the latest stable release
8349 steps :
84- - uses : actions/checkout@v4
85- with :
86- persist-credentials : false
87- - name : Print Docker version
88- run : |
89- docker --version
90- docker version
91- # This next bit of code is taken from:
92- # https://github.com/kleinhenz/SlurmClusterManager.jl
93- # Original author: Joseph Kleinhenz
94- # License: MIT
95- - name : Setup Slurm inside Docker
96- run : |
97- docker version
98- docker compose version
99- docker build --build-arg "JULIA_VERSION=${MATRIX_JULIA_VERSION:?}" -t slurm-cluster-julia -f ci/Dockerfile .
100- docker compose -f ci/docker-compose.yml up -d
101- docker ps
102- env :
103- MATRIX_JULIA_VERSION : ${{matrix.version}}
104- - name : Print some information for debugging purposes
105- run : |
106- docker exec -t slurmctld pwd
107- docker exec -t slurmctld ls -la
108- docker exec -t slurmctld ls -la HTCondorClusterManager
109- - name : Instantiate package
110- run : docker exec -t slurmctld julia --project=HTCondorClusterManager -e 'import Pkg; @show Base.active_project(); Pkg.instantiate(); Pkg.status()'
111- - name : Run tests without a Slurm allocation
112- run : docker exec -t slurmctld julia --project=HTCondorClusterManager -e 'import Pkg; Pkg.test(; test_args=["slurm"])'
113- - name : Run tests inside salloc
114- run : docker exec -t slurmctld salloc -t 00:10:00 -n 2 julia --project=HTCondorClusterManager -e 'import Pkg; Pkg.test(; test_args=["slurm"], coverage=true)'
115- - name : Run tests inside sbatch
116- run : docker exec -t slurmctld HTCondorClusterManager/ci/run_my_sbatch.sh
117- - run : find . -type f -name '*.cov'
118- - name : Copy .cov files out of the Docker container
119- run : docker exec slurmctld /bin/bash -c 'cd /home/docker/HTCondorClusterManager && tar -cf - src/*.cov' | tar -xvf -
120- - run : find . -type f -name '*.cov'
121- # - run: find . -type f -name '*.cov' -exec cat {} \;
122- - uses : julia-actions/julia-processcoverage@v1
123- - uses : codecov/codecov-action@v5
124- with :
125- files : lcov.info
126- token : ${{ secrets.CODECOV_TOKEN }}
127- # If this PR is from a fork, then do NOT fail CI if the Codecov upload errors.
128- # If this PR is NOT from a fork, then DO fail CI if the Codecov upload errors.
129- # If this is not a PR, then DO fail CI if the Codecov upload errors.
130- fail_ci_if_error : ${{ github.event_name != 'pull_request' || github.repository == github.event.pull_request.head.repo.full_name }}
131- example-pull-gcr :
132- runs-on : ubuntu-latest
133- timeout-minutes : 20
134- steps :
135- - uses : actions/checkout@v4
136- with :
137- persist-credentials : false
138- - name : Print Docker version
139- run : |
140- docker --version
141- docker version
142- # - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
143- # if: false
144- # with:
145- # registry: ghcr.io
146- # username: ${{ github.actor }}
147- # password: ${{ secrets.GITHUB_TOKEN }}
148- - name : Docker pull
149- run : |
150- docker pull "ghcr.io/${MY_GCR_NAMESPACE:?}/${MY_GCR_IMAGENAME:?}@${MY_DIGEST_HTCONDOR_EXECUTE:?}"
151- env :
152- # We intentionally pull by full-length digest (NOT tag) for reproducibility:
153- MY_DIGEST_HTCONDOR_EXECUTE : ' sha256:d4384c19cdb2f26bae15b1feef3a12bde66554658562df2626c03ae870003555' # htcondor-execute
154- - name : List images
155- run : |
156- docker ps -a
157- docker images
50+ - uses : actions/checkout@v4
51+ with :
52+ persist-credentials : false
53+ - uses : julia-actions/setup-julia@v2
54+ with :
55+ version : ${{ matrix.version }}
56+ - run : docker version
57+ - run : docker compose version
58+ - run : docker compose pull
59+ working-directory : ci/htcondor
60+ - run : docker compose build --build-arg JULIA_VERSION="${MATRIX_VERSION:?}"
61+ working-directory : ci/htcondor
62+ env :
63+ MATRIX_VERSION : ${{matrix.version}}
64+ - run : ./start-htcondor.sh
65+ working-directory : ci/htcondor
66+ - run : docker compose exec -T --user submituser submit condor_submit --help
67+ working-directory : ci/htcondor
68+ - run : docker compose exec -T --user submituser submit julia --version
69+ working-directory : ci/htcondor
70+ - run : docker compose exec -T --user submituser submit julia --project=/SlurmClusterManager -e 'import Pkg; Pkg.test()'
71+ working-directory : ci/htcondor
72+ - run : find . -type f -name '*.cov'
73+ - name : Copy .cov files out of the Docker container
74+ run : |
75+ # docker compose exec -T --user submituser submit /bin/bash -c 'cd ~/HTCondorClusterManager && tar -cf - src/*.cov' | tar -xvf -
76+ docker compose exec -T --user submituser execute1 /bin/bash -c 'cd ~/HTCondorClusterManager && tar -cf - src/*.cov' | tar -xvf -
77+ # docker compose exec -T --user submituser execute2 /bin/bash -c 'cd ~/HTCondorClusterManager && tar -cf - src/*.cov' | tar -xvf -
78+ - run : find . -type f -name '*.cov'
79+ # - run: find . -type f -name '*.cov' -exec cat {} \;
80+ - uses : julia-actions/julia-processcoverage@v1
81+ - uses : codecov/codecov-action@v5
82+ with :
83+ files : lcov.info
84+ token : ${{ secrets.CODECOV_TOKEN }}
85+ # If this PR is from a fork, then do NOT fail CI if the Codecov upload errors.
86+ # If this PR is NOT from a fork, then DO fail CI if the Codecov upload errors.
87+ # If this is not a PR, then DO fail CI if the Codecov upload errors.
88+ fail_ci_if_error : ${{ github.event_name != 'pull_request' || github.repository == github.event.pull_request.head.repo.full_name }}
0 commit comments