diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 204c96e..f86f5e1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,20 +3,21 @@ name: CI on: pull_request: schedule: - # Run daily at 8 PM UTC, after the nightlies are typically published. - - cron: '0 20 * * *' + # Run daily at 11 AM UTC, after the nightlies are typically published. + - cron: '0 11 * * *' workflow_dispatch: jobs: test: - name: package examples (${{ matrix.os }}) + name: ci/all_tests.sh (${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: - - ubuntu-latest - - macos-15-intel + - ubuntu-26.04 + - macos-26-intel + - macos-26 - windows-2025 defaults: run: @@ -24,7 +25,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Install Zig uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # 2.2.1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 017d3f0..05f743b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ concurrency: jobs: build-bundle: name: Build package bundle - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 outputs: bundle_filename: ${{ steps.bundle.outputs.bundle_filename }} defaults: @@ -28,7 +28,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Install Zig uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # 2.2.1 @@ -65,7 +65,7 @@ jobs: echo "bundle_filename=$BUNDLE_FILENAME" >> "$GITHUB_OUTPUT" - name: Upload package bundle artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: package-bundle path: dist/${{ steps.bundle.outputs.bundle_filename }} @@ -79,8 +79,9 @@ jobs: fail-fast: false matrix: os: - - ubuntu-latest - - macos-15-intel + - ubuntu-26.04 + - macos-26-intel + - macos-26 - windows-2025 defaults: run: @@ -88,7 +89,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Install Zig uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # 2.2.1 @@ -103,7 +104,7 @@ jobs: version: nightly-new-compiler - name: Download package bundle artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: package-bundle path: dist @@ -126,10 +127,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Download package bundle artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: package-bundle path: dist diff --git a/package/Path.roc b/package/Path.roc index 7428347..7f1de4a 100644 --- a/package/Path.roc +++ b/package/Path.roc @@ -158,7 +158,7 @@ utf8_to_utf16 = |remaining, out| utf8_to_utf16(rest, out.append(U8.to_u16(byte))) [byte1, byte2, .. as rest] if byte1 < 0xE0 => { - top = U32.shift_left_by(U8.to_u32(U8.bitwise_and(byte1, 0x1F)), 6) + top = U32.shl_wrap(U8.to_u32(U8.bitwise_and(byte1, 0x1F)), 6) bottom = U8.to_u32(U8.bitwise_and(byte2, 0x3F)) code_point = U32.bitwise_or(top, bottom) @@ -166,8 +166,8 @@ utf8_to_utf16 = |remaining, out| } [byte1, byte2, byte3, .. as rest] if byte1 < 0xF0 => { - top = U32.shift_left_by(U8.to_u32(U8.bitwise_and(byte1, 0x0F)), 12) - middle = U32.shift_left_by(U8.to_u32(U8.bitwise_and(byte2, 0x3F)), 6) + top = U32.shl_wrap(U8.to_u32(U8.bitwise_and(byte1, 0x0F)), 12) + middle = U32.shl_wrap(U8.to_u32(U8.bitwise_and(byte2, 0x3F)), 6) bottom = U8.to_u32(U8.bitwise_and(byte3, 0x3F)) code_point = U32.bitwise_or(U32.bitwise_or(top, middle), bottom) @@ -175,14 +175,14 @@ utf8_to_utf16 = |remaining, out| } [byte1, byte2, byte3, byte4, .. as rest] => { - top = U32.shift_left_by(U8.to_u32(U8.bitwise_and(byte1, 0x07)), 18) - middle1 = U32.shift_left_by(U8.to_u32(U8.bitwise_and(byte2, 0x3F)), 12) - middle2 = U32.shift_left_by(U8.to_u32(U8.bitwise_and(byte3, 0x3F)), 6) + top = U32.shl_wrap(U8.to_u32(U8.bitwise_and(byte1, 0x07)), 18) + middle1 = U32.shl_wrap(U8.to_u32(U8.bitwise_and(byte2, 0x3F)), 12) + middle2 = U32.shl_wrap(U8.to_u32(U8.bitwise_and(byte3, 0x3F)), 6) bottom = U8.to_u32(U8.bitwise_and(byte4, 0x3F)) upper = U32.bitwise_or(U32.bitwise_or(top, middle1), middle2) code_point = U32.bitwise_or(upper, bottom) - high = U32.to_u16_wrap(0xD800 + U32.shift_right_by(code_point - 0x10000, 10)) + high = U32.to_u16_wrap(0xD800 + U32.shr_wrap(code_point - 0x10000, 10)) low = U32.to_u16_wrap(0xDC00 + U32.bitwise_and(code_point - 0x10000, 0x3FF)) utf8_to_utf16(rest, out.append(high).append(low)) @@ -211,7 +211,7 @@ utf16_to_utf8 = |remaining, out, index| [] => Ok(out) [high, low, .. as rest] if is_high_surrogate(high) and is_low_surrogate(low) => { - high_bits = U32.shift_left_by(U16.to_u32(high) - 0xD800, 10) + high_bits = U32.shl_wrap(U16.to_u32(high) - 0xD800, 10) low_bits = U16.to_u32(low) - 0xDC00 code_point = 0x10000 + high_bits + low_bits @@ -233,7 +233,7 @@ utf16_to_utf8_lossy_help = |remaining, out| [] => out [high, low, .. as rest] if is_high_surrogate(high) and is_low_surrogate(low) => { - high_bits = U32.shift_left_by(U16.to_u32(high) - 0xD800, 10) + high_bits = U32.shl_wrap(U16.to_u32(high) - 0xD800, 10) low_bits = U16.to_u32(low) - 0xDC00 code_point = 0x10000 + high_bits + low_bits @@ -252,16 +252,16 @@ append_code_point_utf8 = |out, code_point| if code_point < 0x80 { out.append(U32.to_u8_wrap(code_point)) } else if code_point < 0x800 { - out.append(U32.to_u8_wrap(0xC0 + U32.shift_right_by(code_point, 6))) + out.append(U32.to_u8_wrap(0xC0 + U32.shr_wrap(code_point, 6))) .append(U32.to_u8_wrap(0x80 + U32.bitwise_and(code_point, 0x3F))) } else if code_point < 0x10000 { - out.append(U32.to_u8_wrap(0xE0 + U32.shift_right_by(code_point, 12))) - .append(U32.to_u8_wrap(0x80 + U32.bitwise_and(U32.shift_right_by(code_point, 6), 0x3F))) + out.append(U32.to_u8_wrap(0xE0 + U32.shr_wrap(code_point, 12))) + .append(U32.to_u8_wrap(0x80 + U32.bitwise_and(U32.shr_wrap(code_point, 6), 0x3F))) .append(U32.to_u8_wrap(0x80 + U32.bitwise_and(code_point, 0x3F))) } else { - out.append(U32.to_u8_wrap(0xF0 + U32.shift_right_by(code_point, 18))) - .append(U32.to_u8_wrap(0x80 + U32.bitwise_and(U32.shift_right_by(code_point, 12), 0x3F))) - .append(U32.to_u8_wrap(0x80 + U32.bitwise_and(U32.shift_right_by(code_point, 6), 0x3F))) + out.append(U32.to_u8_wrap(0xF0 + U32.shr_wrap(code_point, 18))) + .append(U32.to_u8_wrap(0x80 + U32.bitwise_and(U32.shr_wrap(code_point, 12), 0x3F))) + .append(U32.to_u8_wrap(0x80 + U32.bitwise_and(U32.shr_wrap(code_point, 6), 0x3F))) .append(U32.to_u8_wrap(0x80 + U32.bitwise_and(code_point, 0x3F))) }