diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d6ea1768..b9fb988f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,22 +1,23 @@ name: Github Actions -on: [push, pull_request] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: jobs: build: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest] - nim-version: ['1.4.x', 'stable'] - + os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - uses: jiro4989/setup-nim-action@v2 - with: - nim-version: ${{ matrix.nim-version }} - repo-token: ${{ secrets.GITHUB_TOKEN }} - - run: nimble test --gc:arc -d:release -y - - run: nimble test --gc:arc -d:release -d:pixieNoSimd -y - - run: nimble test --gc:orc -d:release -y - - run: nim cpp --gc:orc -d:release -r tests/all.nim + - uses: actions/checkout@v5 + - uses: treeform/setup-nim-action@v6 + - name: Install dependencies + shell: bash + run: | + cd .. + nimby install -g pixie/pixie.nimble + - run: nim r tests/tests.nim diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 683a6b54..18d90d74 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,22 +3,25 @@ on: push: branches: - master + workflow_dispatch: +permissions: + contents: write env: - nim-version: 'stable' - nim-src: src/${{ github.event.repository.name }}.nim + nim-src: src/pixie.nim deploy-dir: .gh-pages jobs: docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: jiro4989/setup-nim-action@v1 - with: - nim-version: ${{ env.nim-version }} - - run: nimble install -Y - - run: nimble doc --index:on --project --git.url:https://github.com/${{ github.repository }} --git.commit:master --out:${{ env.deploy-dir }} ${{ env.nim-src }} - - name: "Copy to index.html" - run: cp ${{ env.deploy-dir }}/${{ github.event.repository.name }}.html ${{ env.deploy-dir }}/index.html + - uses: actions/checkout@v5 + - uses: treeform/setup-nim-action@v6 + - name: Install dependencies + run: | + cd .. + nimby install -g pixie/pixie.nimble + - run: nim doc --index:on --project --git.url:https://github.com/${{ github.repository }} --git.commit:master --out:${{ env.deploy-dir }} ${{ env.nim-src }} + - name: Copy to index.html + run: cp ${{ env.deploy-dir }}/pixie.html ${{ env.deploy-dir }}/index.html - name: Deploy documents uses: peaceiris/actions-gh-pages@v3 with: diff --git a/.gitignore b/.gitignore index caff1f8b..639c87c4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,23 @@ -# ignore files with no extention: +# Ignore files with no extention. * !*/ !*.* +!LICENSE -# normal ignores: +# Ignore hidden files, but not the license or github files. +.* +!.github/ +!.github/** +!.gitignore + +# Normal ignores. *.exe nimcache *.pdb *.ilk -.* +*.out + +# Project specific ignores. *.dll __pycache__ bindings/generated @@ -17,4 +26,4 @@ dump.txt tests/fileformats/jpeg/generated tests/fileformats/jpeg/diffs *.dylib -tmp +tmp/ diff --git a/README.md b/README.md index 051fdba7..1e734d17 100644 --- a/README.md +++ b/README.md @@ -2,20 +2,28 @@ 👏 👏 👏 Check out video about the library: [A full-featured 2D graphics library for Nim (NimConf 2021)](https://www.youtube.com/watch?v=8acDfUIwLnk) 👏 👏 👏 -# Pixie - A full-featured 2D graphics library for Nim +# Pixie - A full-featured 2D graphics library for Nim. Pixie is a 2D graphics library similar to [Cairo](https://www.cairographics.org/) and [Skia](https://skia.org) written entirely in Nim. This library is being actively developed and we'd be happy for you to use it. -`nimble install pixie` +`nimby install pixie` ![Github Actions](https://github.com/treeform/pixie/workflows/Github%20Actions/badge.svg) +![GitHub release (latest by date)](https://img.shields.io/github/v/release/treeform/pixie) +![GitHub Repo stars](https://img.shields.io/github/stars/treeform/pixie) +![GitHub](https://img.shields.io/github/license/treeform/pixie) +![GitHub issues](https://img.shields.io/github/issues/treeform/pixie) [API reference](https://treeform.github.io/pixie) [Pixie Book](https://github.com/treeform/pixiebook) +## About + +Pixie includes CPU rasterization, image codecs, text layout, paths, paints, masking, blending, and SIMD-accelerated operations. + ### Videos * [Pixie 5.0 performance improvements](https://www.youtube.com/watch?v=Did21OYIrGI) @@ -111,7 +119,7 @@ To learn how to use Pixie for realtime graphics with GPU, check out [Boxy](https ## Testing -`nimble test` +`nim r tests/tests.nim` ## Examples diff --git a/pixie.nimble b/pixie.nimble index 6903560c..0b1bdf90 100644 --- a/pixie.nimble +++ b/pixie.nimble @@ -5,14 +5,14 @@ license = "MIT" srcDir = "src" -requires "nim >= 1.4.8" +requires "nim >= 2.0.0" requires "vmath >= 3.0.0" -requires "chroma >= 0.2.6" -requires "zippy >= 0.10.3" +requires "chroma >= 1.0.0" +requires "zippy >= 0.10.16" requires "flatty >= 0.3.4" -requires "nimsimd >= 1.2.4" +requires "nimsimd >= 1.3.2" requires "bumpy >= 1.1.3" -requires "crunchy >= 0.1.0" +requires "crunchy >= 0.1.11" task bindings, "Generate bindings": diff --git a/tests/all.nim b/tests/tests.nim similarity index 100% rename from tests/all.nim rename to tests/tests.nim