Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Swift on Ubuntu

on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
tests-linux:
strategy:
matrix:
swift: ["6"]
ubuntu: ["ubuntu-24.04"]

name: SwiftPM build in Swift ${{ matrix.swift }} on ${{ matrix.ubuntu }}
runs-on: ${{ matrix.ubuntu }}
steps:
- name: Log versions
run: echo "Target Swift ${{ matrix.swift }} on ${{ matrix.ubuntu }}"
- name: Setup Swift version
uses: swift-actions/setup-swift@v2
with:
swift-version: ${{ matrix.swift }}
- name: Checkout
uses: actions/checkout@v4
- name: linuxmain
run: |
echo "::notice title=Build Environment::Running on ${{ matrix.os }}"
uname -a
swift --version
swift build
swift test
- name: Build
run: swift build
- name: Test
run: swift test
28 changes: 28 additions & 0 deletions .github/workflows/test-macOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Swift on macOS (latest)

on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
tests-macOS:
strategy:
fail-fast: false
matrix:
swift: ["5", "6"]
destination: [macOS]

name: SwiftPM macOS
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: swift build
- name: Test
run: swift test
22 changes: 0 additions & 22 deletions .github/workflows/tests.yml

This file was deleted.

12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,24 @@ import SwiftRoaring
let bitmap = RoaringBitmap()

//Example: Add Range
bitmap.addRange(min: 0, max: 500)
bitmap.addRange(min: 0, max: 50)

//Example: copy
let cpy = bitmap.copy()

//Example: Operators
let and = bitmap && cpy
let and = bitmap.union(cpy)

let delta = and.subtracting(bitmap)
print("copy, union, and subtract -> empty: \(delta.isEmpty)")

//Example: Iterate
var out = ""
for i in bitmap {
print(i)
out += "\(i) "
}
print("0 ..< 50: \(out)")


//See documentation for more functionalities!

Expand Down
Loading
Loading