52
52
matrix :
53
53
os : [ 'ubuntu-latest' ]
54
54
architecture : [ 'x64', 'arm64' ]
55
- dotnet-version : [ '8.0.x' ]
56
55
57
56
steps :
58
57
- uses : actions/checkout@v4
@@ -61,10 +60,10 @@ jobs:
61
60
with :
62
61
load-mode : strict
63
62
64
- - name : Setup Dotnet ${{ matrix.dotnet-version }}
63
+ - name : Setup Dotnet
65
64
uses : actions/setup-dotnet@v4
66
65
with :
67
- dotnet-version : ${{ matrix.dotnet-version }}
66
+ dotnet-version : ' 8.0.x '
68
67
69
68
- name : install Wasi workload
70
69
run : dotnet workload install wasi-experimental
@@ -88,20 +87,21 @@ jobs:
88
87
./scripts/wasm/copy_plugin_to.sh dist
89
88
90
89
- name : upload wasm plugin as artifact
91
- if : matrix.architecture == 'arm64'
90
+ if : matrix.architecture == 'arm64' # this needs to happen once across matrix
92
91
uses : actions/upload-artifact@v4
93
92
with :
94
93
name : wasm-file
95
94
path : dist/plugin.wasm
96
95
97
- generate -tests :
98
- name : Codegen Tests
96
+ codegen -tests :
97
+ name : Codegen Test
99
98
runs-on : ubuntu-latest
100
99
needs : [build]
101
100
strategy :
102
101
matrix :
103
102
file-per-query : [ 'true', 'false' ]
104
103
generate-csproj : [ 'true', 'false' ]
104
+ target-framework : [ 'net8.0', 'netstandard2.0', 'netstandard2.1' ]
105
105
106
106
steps :
107
107
- uses : actions/checkout@v4
@@ -119,27 +119,22 @@ jobs:
119
119
with :
120
120
sqlc-version : ' 1.25.0'
121
121
122
- - name : Updating configuration
123
- env :
124
- FILE_PER_QUERY : ${{ matrix.file-per-query }}
125
- GENERATE_CSPROJ : ${{ matrix.generate-csproj }}
126
- run : |
127
- ./scripts/wasm/update_sha.sh sqlc.ci.yaml
128
- ./scripts/update_config.sh sqlc.ci.yaml $FILE_PER_QUERY $GENERATE_CSPROJ
122
+ - name : Updating plugin sha
123
+ run : ./scripts/wasm/update_sha.sh sqlc.ci.yaml
129
124
130
- - name : Sqlc generate using Wasm plugin
131
- env :
132
- FILE_PER_QUERY : ${{ matrix.file-per-query }}
133
- GENERATE_CSPROJ : ${{ matrix.generate-csproj }}
125
+ - name : Codegen Test
134
126
run : |
135
- rm MySqlConnectorExample/*.cs NpgsqlExample/*.cs
136
- sqlc -f sqlc.ci.yaml generate
137
- ./scripts/run_codegen_tests.sh $FILE_PER_QUERY $GENERATE_CSPROJ
127
+ ./scripts/run_codegen_test.sh sqlc.ci.yaml \
128
+ ${{ matrix.file-per-query }} ${{ matrix.generate-csproj }} ${{ matrix.target-framework }}
138
129
130
+ - uses : actions/setup-dotnet@v4
131
+ with :
132
+ dotnet-version : ${{ matrix.target-framework == 'net8.0' && '8.0.x' || '3.1.x' }}
133
+
139
134
end2end-tests :
140
135
name : End-to-End Tests
141
136
runs-on : ubuntu-latest
142
- needs : [generate -tests]
137
+ needs : [codegen -tests]
143
138
144
139
steps :
145
140
- uses : actions/checkout@v4
0 commit comments