Added memory test for JsValue #123
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| concurrency: | |
| group: ${{ github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| env: | |
| PROJECT_NAME: ion | |
| profile: release | |
| jobs: | |
| version: | |
| name: π Auto Version Increment | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| VERSION: ${{ steps.generate.outputs.VERSION }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - id: generate | |
| run: | | |
| set -e | |
| LAST_VERSION=$(curl -sSL https://api.github.com/repos/alshdavid/$PROJECT_NAME/releases/latest | jq -r ".tag_name" | cut -d "." -f 3) | |
| if [ "$LAST_VERSION" = "" ]; then | |
| LAST_VERSION="0" | |
| fi | |
| declare -i var="$LAST_VERSION" | |
| var=$var+1 | |
| VERSION="0.0.$var" | |
| echo $VERSION | |
| echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT" | |
| test: | |
| name: π§ͺ Test | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: eval $(curl -sSf sh.davidalsh.com/rust.sh | sh) | |
| - run: cargo test | |
| test-e2e: | |
| name: π§ͺ Test E2E | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: eval $(curl -sSf sh.davidalsh.com/rust.sh | sh) | |
| - run: eval $(curl -sSf sh.davidalsh.com/deno.sh | sh) | |
| - run: ./examples/run-tests-debug | |
| format: | |
| name: π Format | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: eval $(curl -sSf sh.davidalsh.com/rust.sh | sh) | |
| - run: cargo install cargo-xfmt | |
| - run: cargo xfmt --check | |
| - run: cargo clippy -- --deny "warnings" | |
| build_linux_amd64: | |
| name: π₯ Linux AMD64 | |
| runs-on: ubuntu-24.04 | |
| defaults: | |
| run: | |
| working-directory: ${{ github.workspace }} | |
| container: | |
| image: debian:12 | |
| env: | |
| DEBIAN_FRONTEND: noninteractive | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: apt-get update -y && apt-get install -y curl build-essential | |
| - run: eval $(curl -sSf sh.davidalsh.com/just.sh | sh) | |
| - run: eval $(curl -sSf sh.davidalsh.com/rust.sh | sh) | |
| - run: just build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ion-linux-amd64 | |
| path: ${{ github.workspace }}/target/linux-amd64/release/**/* | |
| if-no-files-found: error | |
| retention-days: 1 | |
| build_linux_arm64: | |
| name: π₯ Linux ARM64 | |
| runs-on: ubuntu-24.04-arm | |
| defaults: | |
| run: | |
| working-directory: ${{ github.workspace }} | |
| container: | |
| image: debian:12 | |
| env: | |
| DEBIAN_FRONTEND: noninteractive | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: apt-get update -y && apt-get install -y curl build-essential | |
| - run: eval $(curl -sSf sh.davidalsh.com/just.sh | sh) | |
| - run: eval $(curl -sSf sh.davidalsh.com/rust.sh | sh) | |
| - run: just build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ion-linux-arm64 | |
| path: ${{ github.workspace }}/target/linux-arm64/release/**/* | |
| if-no-files-found: error | |
| retention-days: 1 | |
| build_macos_arm64: | |
| name: π MacOS ARM64 | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: eval $(curl -sSf sh.davidalsh.com/just.sh | sh) | |
| - run: eval $(curl -sSf sh.davidalsh.com/rust.sh | sh) | |
| - run: just build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ion-macos-arm64 | |
| path: ${{ github.workspace }}/target/macos-arm64/release/**/* | |
| if-no-files-found: error | |
| retention-days: 1 | |
| build_windows_amd64: | |
| name: π¦ Windows amd64 | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: eval $(curl -sSf sh.davidalsh.com/just.sh | sh) | |
| - run: eval $(curl -sSf sh.davidalsh.com/rust.sh | sh) | |
| - run: just build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ion-windows-amd64 | |
| path: ${{ github.workspace }}/target/windows-amd64/release/**/* | |
| if-no-files-found: error | |
| retention-days: 1 | |
| publish-github-release: | |
| name: "π Publish Github Release" | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| - version | |
| - test | |
| - test-e2e | |
| - format | |
| - build_linux_amd64 | |
| - build_linux_arm64 | |
| - build_macos_arm64 | |
| - build_windows_amd64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: { path: artifacts } | |
| - name: Publish` Github Release | |
| env: | |
| VERSION: ${{needs.version.outputs.VERSION}} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| set -e | |
| echo "Tag: ${VERSION}" | |
| gh release create $VERSION --draft --notes "Automatically built binaries" | |
| gh release edit $VERSION --title "π Latest" | |
| cd artifacts | |
| for name in *; do | |
| echo $name | |
| cd "${{ github.workspace }}/artifacts/${name}" | |
| ls -l | |
| chmod +x ./* | |
| tar -czvf ./${name}.tar.gz ./* | |
| gh release upload $VERSION ${name}.tar.gz | |
| done | |
| gh release edit $VERSION --draft=false |