mirror of
https://github.com/chronotope/chrono.git
synced 2025-09-28 05:21:39 +00:00
First attempt to fix this issue for wasm32-unknown-* targets by changing visibility of functions not to leak crate-private types. Ensure the default toolchain is used for the wasm_unknown CI test.
This commit is contained in:
parent
4333e39d13
commit
7097f933eb
24
.github/workflows/test.yml
vendored
24
.github/workflows/test.yml
vendored
@ -149,6 +149,30 @@ jobs:
|
||||
RUST_VERSION: stable
|
||||
WASM: wasm_emscripten
|
||||
|
||||
wasm_unknown:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
target: wasm32-unknown-unknown
|
||||
override: true
|
||||
default: true
|
||||
|
||||
- name: Build and Test
|
||||
run: bash ci/github.sh
|
||||
env:
|
||||
RUST_VERSION: stable
|
||||
WASM: wasm_unknown
|
||||
|
||||
cross-targets:
|
||||
strategy:
|
||||
matrix:
|
||||
|
@ -36,6 +36,8 @@ meaningful in the github actions feature matrix UI.
|
||||
test_wasm_simple
|
||||
elif [[ ${WASM:-} == wasm_emscripten ]]; then
|
||||
test_wasm_emscripten
|
||||
elif [[ ${WASM:-} == wasm_unknown ]]; then
|
||||
test_wasm_unknown
|
||||
elif [[ ${CORE:-} == no_std ]]; then
|
||||
test_core
|
||||
elif [[ ${EXHAUSTIVE_TZ:-} == all_tzs ]]; then
|
||||
@ -118,4 +120,8 @@ test_wasm_emscripten() {
|
||||
runt cargo build --target wasm32-unknown-emscripten
|
||||
}
|
||||
|
||||
test_wasm_unknown() {
|
||||
runt cargo build --target wasm32-unknown-unknown
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
@ -65,16 +65,16 @@ fn tm_to_time(tm: &Tm) -> i64 {
|
||||
+ s
|
||||
}
|
||||
|
||||
pub fn time_to_local_tm(sec: i64, tm: &mut Tm) {
|
||||
pub(super) fn time_to_local_tm(sec: i64, tm: &mut Tm) {
|
||||
// FIXME: Add timezone logic
|
||||
time_to_tm(sec, tm);
|
||||
}
|
||||
|
||||
pub fn utc_tm_to_time(tm: &Tm) -> i64 {
|
||||
pub(super) fn utc_tm_to_time(tm: &Tm) -> i64 {
|
||||
tm_to_time(tm)
|
||||
}
|
||||
|
||||
pub fn local_tm_to_time(tm: &Tm) -> i64 {
|
||||
pub(super) fn local_tm_to_time(tm: &Tm) -> i64 {
|
||||
// FIXME: Add timezone logic
|
||||
tm_to_time(tm)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user