Skip to content

Commit

Permalink
ci,examples: fix `v examples/sokol/simple_shader_glsl/simple_shader.v…
Browse files Browse the repository at this point in the history
…`, ensure it compiles on the `misc-tooling` job (#19404)
  • Loading branch information
spytheman authored Sep 21, 2023
1 parent baf5d8a commit c075e44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions cmd/tools/modules/testing/common.v
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ pub fn new_test_session(_vargs string, will_compile bool) TestSession {
skip_files << 'vlib/net/mbedtls/mbedtls_compiles_test.v'
skip_files << 'vlib/net/ssl/ssl_compiles_test.v'
}
if testing.github_job != 'sokol-shaders-can-be-compiled' {
if testing.github_job != 'misc-tooling' {
// These examples need .h files that are produced from the supplied .glsl files,
// using by the shader compiler tools in https://github.com/floooh/sokol-tools-bin/archive/pre-feb2021-api-changes.tar.gz
skip_files << 'examples/sokol/simple_shader_glsl/simple_shader.v'
Expand All @@ -241,6 +241,10 @@ pub fn new_test_session(_vargs string, will_compile bool) TestSession {
skip_files << 'examples/sokol/05_instancing_glsl/rt_glsl.v'
// Skip obj_viewer code in the CI
skip_files << 'examples/sokol/06_obj_viewer/show_obj.v'
// skip the audio examples too on most CI jobs
skip_files << 'examples/sokol/sounds/melody.v'
skip_files << 'examples/sokol/sounds/wav_player.v'
skip_files << 'examples/sokol/sounds/simple_sin_tones.v'
}
if testing.github_job != 'ubuntu-tcc' {
skip_files << 'examples/c_interop_wkhtmltopdf.v' // needs installation of wkhtmltopdf from https://github.com/wkhtmltopdf/packaging/releases
Expand All @@ -250,11 +254,6 @@ pub fn new_test_session(_vargs string, will_compile bool) TestSession {
skip_files << 'vlib/x/ttf/ttf_test.v'
skip_files << 'vlib/vweb/vweb_app_test.v' // imports the `sqlite` module, which in turn includes sqlite3.h
}
if testing.github_job != 'audio-examples' {
skip_files << 'examples/sokol/sounds/melody.v'
skip_files << 'examples/sokol/sounds/wav_player.v'
skip_files << 'examples/sokol/sounds/simple_sin_tones.v'
}
$if !macos {
skip_files << 'examples/macos_tray/tray.v'
}
Expand Down
4 changes: 2 additions & 2 deletions examples/sokol/simple_shader_glsl/simple_shader.v
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ fn (mut a App) run() {
}

fn init(user_data voidptr) {
mut app := &App(user_data)
mut app := unsafe { &App(user_data) }
mut desc := sapp.create_desc()

gfx.setup(&desc)
Expand Down Expand Up @@ -142,7 +142,7 @@ fn cleanup(user_data voidptr) {
}

fn frame(user_data voidptr) {
mut app := &App(user_data)
mut app := unsafe { &App(user_data) }

gfx.begin_default_pass(&app.pass_action, sapp.width(), sapp.height())

Expand Down

0 comments on commit c075e44

Please sign in to comment.