jobs:
setup:
name: Set up
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
outputs:
VERSION: ${{ steps.setup.outputs.VERSION }}
DOING_RELEASE: ${{ steps.setup.outputs.DOING_RELEASE }}
matrix:
include:
- build: linux-amd64
- os: ubuntu-latest
+ os: ubuntu-20.04
runtime_library: ovmwasm
artifact_name: 'onyx-linux-ovm-amd64'
- build: linux-amd64
- os: ubuntu-latest
+ os: ubuntu-20.04
runtime_library: wasmer
artifact_name: 'onyx-linux-wasmer-amd64'
- build: linux-amd64
- os: ubuntu-latest
+ os: ubuntu-20.04
runtime_library: none
artifact_name: 'onyx-linux-none-amd64'
- build: darwin-arm64
#endif
#if defined(_BH_WINDOWS)
- // The GetCurrentDirectory symbol is causing a linker error.
- // For a hotfix, I am leaving these unimplemented for now,
- // but they should be fixed asap.
- //
- // int length = GetCurrentDirectory(params->data[1].of.i32, ONYX_PTR(params->data[0].of.i32));
- // if (length == 0 || length > params->data[1].of.i32) {
- // results->data[0] = WASM_I32_VAL(-1);
- // return NULL;
- // }
-
- results->data[0] = WASM_I32_VAL(-1);
+ int length = GetCurrentDirectory(params->data[1].of.i32, ONYX_PTR(params->data[0].of.i32));
+ if (length == 0 || length > params->data[1].of.i32) {
+ results->data[0] = WASM_I32_VAL(-1);
+ return NULL;
+ }
+
+ results->data[0] = WASM_I32_VAL(length);
return NULL;
#endif
}
#endif
#if defined(_BH_WINDOWS)
- // The SetCurrentDirectory symbol is causing a linker error.
- // For a hotfix, I am leaving these unimplemented for now,
- // but they should be fixed asap.
- //
- // int result = SetCurrentDirectory(ONYX_PTR(params->data[0].of.i32));
- results->data[0] = WASM_I32_VAL(0);
+ int result = SetCurrentDirectory(ONYX_PTR(params->data[0].of.i32));
+ results->data[0] = WASM_I32_VAL(result ? 1 : 0);
return NULL;
#endif
}