Skip to content

Commit feae1f2

Browse files
authored
Make the GitHub actions script more parallel (#2674)
1 parent b3a78e6 commit feae1f2

File tree

21 files changed

+109
-84
lines changed

21 files changed

+109
-84
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,66 +6,50 @@ on:
66
- release-*
77
pull_request:
88
types: [opened, synchronize, reopened]
9+
concurrency:
10+
# Skip intermediate builds: always.
11+
# Cancel intermediate builds: only if it is a pull request build.
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
914
# needed to allow julia-actions/cache to delete old caches that it has created
1015
permissions:
1116
actions: write
1217
contents: read
1318
jobs:
1419
test:
15-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.moi_test_modules }} - ${{ github.event_name }}
16-
runs-on: ${{ matrix.os }}
20+
name: Julia ${{ matrix.machine.version }} - ${{ matrix.machine.os }}-${{ matrix.machine.arch }} - ${{ matrix.moi_test_modules }}
21+
runs-on: ${{ matrix.machine.os }}
1722
strategy:
1823
fail-fast: false
1924
matrix:
20-
# Since MOI doesn't have binary dependencies, only test on a subset of
21-
# possible platforms.
22-
include:
25+
moi_test_modules:
26+
- 'General;Benchmarks;FileFormats;Nonlinear'
27+
- 'Bridges'
28+
- 'Bridges/Constraint;Bridges/Objective;Bridges/Variable'
29+
- 'Test'
30+
- 'Utilities'
31+
machine:
2332
- version: 'nightly'
2433
os: ubuntu-latest
2534
arch: x64
26-
moi_test_modules: 'General;Nonlinear;Bridges;FileFormats'
27-
- version: 'nightly'
28-
os: ubuntu-latest
29-
arch: x64
30-
moi_test_modules: 'Test;Utilities;Benchmarks'
31-
- version: '1'
32-
os: ubuntu-latest
33-
arch: x64
34-
moi_test_modules: 'General;Nonlinear;Bridges;FileFormats'
3535
- version: '1'
3636
os: ubuntu-latest
3737
arch: x64
38-
moi_test_modules: 'Test;Utilities;Benchmarks'
3938
- version: '1'
4039
os: windows-latest
4140
arch: x64
42-
moi_test_modules: 'General;Nonlinear;Bridges;FileFormats'
43-
- version: '1'
44-
os: windows-latest
45-
arch: x64
46-
moi_test_modules: 'Test;Utilities;Benchmarks'
47-
- version: '1.6'
48-
os: ubuntu-latest
49-
arch: x64
50-
moi_test_modules: 'General;Nonlinear;Bridges;FileFormats'
5141
- version: '1.6'
5242
os: ubuntu-latest
5343
arch: x64
54-
moi_test_modules: 'Test;Utilities;Benchmarks'
55-
- version: '1'
56-
os: ubuntu-latest
57-
arch: x86
58-
moi_test_modules: 'General;Nonlinear;Bridges;FileFormats'
5944
- version: '1'
6045
os: ubuntu-latest
6146
arch: x86
62-
moi_test_modules: 'Test;Utilities;Benchmarks'
6347
steps:
6448
- uses: actions/checkout@v4
6549
- uses: julia-actions/setup-julia@v2
6650
with:
67-
version: ${{ matrix.version }}
68-
arch: ${{ matrix.arch }}
51+
version: ${{ matrix.machine.version }}
52+
arch: ${{ matrix.machine.arch }}
6953
- uses: julia-actions/cache@v1
7054
- uses: julia-actions/julia-buildpkg@v1
7155
- uses: julia-actions/julia-runtest@v1
File renamed without changes.

test/Bridges/Bridges.jl

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright (c) 2017: Miles Lubin and contributors
2+
# Copyright (c) 2017: Google Inc.
3+
#
4+
# Use of this source code is governed by an MIT-style license that can be found
5+
# in the LICENSE.md file or at https://opensource.org/licenses/MIT.
6+
7+
using Test
8+
9+
@testset "$(file)" for file in readdir(@__DIR__; join = true)
10+
if !endswith(file, ".jl") || endswith(file, "runtests.jl")
11+
continue
12+
end
13+
include(file)
14+
end

test/Bridges/Objective/runtests.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright (c) 2017: Miles Lubin and contributors
2+
# Copyright (c) 2017: Google Inc.
3+
#
4+
# Use of this source code is governed by an MIT-style license that can be found
5+
# in the LICENSE.md file or at https://opensource.org/licenses/MIT.
6+
7+
using Test
8+
9+
@testset "$(file)" for file in readdir(@__DIR__; join = true)
10+
if !endswith(file, ".jl") || endswith(file, "runtests.jl")
11+
continue
12+
end
13+
include(file)
14+
end

test/Bridges/Variable/runtests.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright (c) 2017: Miles Lubin and contributors
2+
# Copyright (c) 2017: Google Inc.
3+
#
4+
# Use of this source code is governed by an MIT-style license that can be found
5+
# in the LICENSE.md file or at https://opensource.org/licenses/MIT.
6+
7+
using Test
8+
9+
@testset "$(file)" for file in readdir(@__DIR__; join = true)
10+
if !endswith(file, ".jl") || endswith(file, "runtests.jl")
11+
continue
12+
end
13+
include(file)
14+
end

test/Bridges/runtests.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2017: Miles Lubin and contributors
2+
# Copyright (c) 2017: Google Inc.
3+
#
4+
# Use of this source code is governed by an MIT-style license that can be found
5+
# in the LICENSE.md file or at https://opensource.org/licenses/MIT.
6+
7+
using Test
8+
9+
files_to_exclude = ["runtests.jl", "sdpa_models.jl", "utilities.jl"]
10+
@testset "$(file)" for file in readdir(@__DIR__; join = true)
11+
if !endswith(file, ".jl") || any(f -> endswith(file, f), files_to_exclude)
12+
continue
13+
end
14+
include(file)
15+
end
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)