34
34
35
35
# CI to validate on different os/targets
36
36
lint_build_test :
37
- name : ${{ matrix.runner }} - ${{ matrix.target }}
37
+ name : ${{ matrix.runner }} - ${{ matrix.target }}${{ matrix.profile == 'release' && ' (release)' || '' }}
38
38
runs-on : ${{ matrix.runner }}
39
39
timeout-minutes : 30
40
40
defaults :
@@ -49,18 +49,31 @@ jobs:
49
49
include :
50
50
- runner : macos-14
51
51
target : aarch64-apple-darwin
52
+ profile : dev
52
53
- runner : macos-14
53
54
target : x86_64-apple-darwin
55
+ profile : dev
56
+ - runner : macos-14
57
+ target : aarch64-apple-darwin
58
+ profile : release
54
59
- runner : ubuntu-24.04
55
60
target : x86_64-unknown-linux-musl
61
+ profile : dev
62
+ - runner : ubuntu-24.04
63
+ target : x86_64-unknown-linux-musl
64
+ profile : release
56
65
- runner : ubuntu-24.04
57
66
target : x86_64-unknown-linux-gnu
67
+ profile : dev
58
68
- runner : ubuntu-24.04-arm
59
69
target : aarch64-unknown-linux-musl
70
+ profile : dev
60
71
- runner : ubuntu-24.04-arm
61
72
target : aarch64-unknown-linux-gnu
73
+ profile : dev
62
74
- runner : windows-latest
63
75
target : x86_64-pc-windows-msvc
76
+ profile : dev
64
77
65
78
steps :
66
79
- uses : actions/checkout@v4
77
90
~/.cargo/registry/cache/
78
91
~/.cargo/git/db/
79
92
${{ github.workspace }}/codex-rs/target/
80
- key : cargo-${{ matrix.runner }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
93
+ key : cargo-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}
81
94
82
95
- if : ${{ matrix.target == 'x86_64-unknown-linux-musl' || matrix.target == 'aarch64-unknown-linux-musl'}}
83
96
name : Install musl build tools
86
99
87
100
- name : cargo clippy
88
101
id : clippy
89
- continue-on-error : true
90
102
run : cargo clippy --target ${{ matrix.target }} --all-features --tests -- -D warnings
91
103
92
104
# Running `cargo build` from the workspace root builds the workspace using
@@ -98,12 +110,12 @@ jobs:
98
110
id : build
99
111
if : ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
100
112
continue-on-error : true
101
- run : find . -name Cargo.toml -mindepth 2 -maxdepth 2 -print0 | xargs -0 -n1 -I{} bash -c 'cd "$(dirname "{}")" && cargo build'
113
+ run : find . -name Cargo.toml -mindepth 2 -maxdepth 2 -print0 | xargs -0 -n1 -I{} bash -c 'cd "$(dirname "{}")" && cargo build --profile ${{ matrix.profile }} '
102
114
103
115
- name : cargo test
104
116
id : test
105
117
continue-on-error : true
106
- run : cargo test --all-features --target ${{ matrix.target }}
118
+ run : cargo test --all-features --target ${{ matrix.target }} --profile ${{ matrix.profile }}
107
119
env :
108
120
RUST_BACKTRACE : 1
109
121
0 commit comments