fix: remove test-frontend-js and test-python-recorder from just test #1836
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: Codetracer CI | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| jobs: | ||
| lint-bash: | ||
| runs-on: [self-hosted, nixos] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Install Nix | ||
| uses: ./.github/actions/setup-nix | ||
| with: | ||
| cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
| cachix-cache: ${{ vars.CACHIX_CACHE }} | ||
| trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }} | ||
| substituters: ${{ vars.SUBSTITUTERS }} | ||
| gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - run: "nix develop .#devShells.x86_64-linux.default -c ./ci/lint/bash.sh" | ||
| lint-nim: | ||
| runs-on: [self-hosted, nixos] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Install Nix | ||
| uses: ./.github/actions/setup-nix | ||
| with: | ||
| cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
| cachix-cache: ${{ vars.CACHIX_CACHE }} | ||
| trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }} | ||
| substituters: ${{ vars.SUBSTITUTERS }} | ||
| gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - run: "nix develop .#devShells.x86_64-linux.default -c ./ci/lint/nim.sh" | ||
| lint-nix: | ||
| runs-on: [self-hosted, nixos] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Install Nix | ||
| uses: ./.github/actions/setup-nix | ||
| with: | ||
| cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
| cachix-cache: ${{ vars.CACHIX_CACHE }} | ||
| trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }} | ||
| substituters: ${{ vars.SUBSTITUTERS }} | ||
| gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - run: "nix develop .#devShells.x86_64-linux.default --override-input codetracer-ruby-recorder path:./libs/codetracer-ruby-recorder -c ./ci/lint/nix.sh" | ||
| lint-rust: | ||
| runs-on: [self-hosted, nixos] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Install Nix | ||
| uses: ./.github/actions/setup-nix | ||
| with: | ||
| cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
| cachix-cache: ${{ vars.CACHIX_CACHE }} | ||
| trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }} | ||
| substituters: ${{ vars.SUBSTITUTERS }} | ||
| gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - run: "nix develop .#devShells.x86_64-linux.default -c ./ci/lint/rust.sh" | ||
| lint-ui-tests: | ||
| runs-on: [self-hosted, nixos] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Install Nix | ||
| uses: ./.github/actions/setup-nix | ||
| with: | ||
| cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
| cachix-cache: ${{ vars.CACHIX_CACHE }} | ||
| trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }} | ||
| substituters: ${{ vars.SUBSTITUTERS }} | ||
| gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - run: "nix develop .#devShells.x86_64-linux.default -c ./ci/lint/ui-tests.sh" | ||
| push-gpg-public-key: | ||
| runs-on: [self-hosted, nixos] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: "Import GPG key for signing commits" | ||
| id: import-gpg | ||
| uses: crazy-max/ghaction-import-gpg@v6 | ||
| with: | ||
| gpg_private_key: ${{ secrets.CODETRACER_AUR_GPG_PRIVATE_KEY }} | ||
| passphrase: ${{ secrets.CODETRACER_AUR_GPG_PRIVATE_KEY_PASS }} | ||
| git_config_global: true | ||
| git_user_signingkey: true | ||
| git_commit_gpgsign: true | ||
| - name: "Upload public key" | ||
| env: | ||
| AWS_ACCESS_KEY_ID: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY_ID }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY }} | ||
| run: | | ||
| nix develop .#devShells.x86_64-linux.default --command gpg --armor --export > CodeTracer.pub.asc | ||
| nix develop .#devShells.x86_64-linux.default --command aws --endpoint-url=${{ secrets.R2_CODETRACER_BUCKET_S3_ENDPOINT }} s3 cp CodeTracer.pub.asc s3://${{ vars.R2_CODETRACER_BUCKET_NAME }}/CodeTracer.pub.asc | ||
| push-install-script: | ||
| runs-on: [self-hosted, nixos] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Upload script | ||
| env: | ||
| AWS_ACCESS_KEY_ID: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY_ID }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY }} | ||
| run: | | ||
| nix develop .#devShells.x86_64-linux.default --command aws --endpoint-url=${{ secrets.R2_CODETRACER_BUCKET_S3_ENDPOINT }} s3 cp install-on-distributions.sh s3://${{ vars.R2_CODETRACER_BUCKET_NAME }}/install.sh | ||
| dev-build: | ||
| runs-on: [self-hosted, nixos] | ||
| needs: | ||
| - lint-bash | ||
| - lint-nim | ||
| - lint-nix | ||
| - lint-rust | ||
| - lint-ui-tests | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Install Nix | ||
| uses: ./.github/actions/setup-nix | ||
| with: | ||
| cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
| cachix-cache: ${{ vars.CACHIX_CACHE }} | ||
| trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }} | ||
| substituters: ${{ vars.SUBSTITUTERS }} | ||
| gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - run: "nix develop .#devShells.x86_64-linux.default --command ./ci/build/dev.sh" | ||
| nix-build: | ||
| runs-on: [self-hosted, nixos] | ||
| needs: | ||
| - lint-bash | ||
| - lint-nim | ||
| - lint-nix | ||
| - lint-rust | ||
| - lint-ui-tests | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Install Nix | ||
| uses: ./.github/actions/setup-nix | ||
| with: | ||
| cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
| cachix-cache: ${{ vars.CACHIX_CACHE }} | ||
| trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }} | ||
| substituters: ${{ vars.SUBSTITUTERS }} | ||
| gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - run: "nix develop .#devShells.x86_64-linux.default --command ./ci/build/nix.sh" | ||
| build-python-packages: | ||
| needs: | ||
| - lint-bash | ||
| - lint-nim | ||
| - lint-nix | ||
| - lint-rust | ||
| - lint-ui-tests | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - name: linux-amd64 | ||
| runner: ubuntu-latest | ||
| target_os: linux | ||
| arch: amd64 | ||
| plat_name: manylinux_2_17_x86_64 | ||
| # - name: linux-arm64 | ||
| # runner: ubuntu-22.04-arm64 | ||
| # target_os: linux | ||
| # arch: arm64 | ||
| # plat_name: manylinux_2_17_aarch64 | ||
| - name: macos-amd64 | ||
| runner: macos-15-intel | ||
| target_os: macos | ||
| arch: amd64 | ||
| plat_name: macosx_10_9_x86_64 | ||
| - name: macos-arm64 | ||
| runner: macos-14 | ||
| target_os: macos | ||
| arch: arm64 | ||
| plat_name: macosx_11_0_arm64 | ||
| runs-on: ${{ matrix.runner }} | ||
| steps: | ||
| - name: Check out repository | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: 'true' | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: '3.11' | ||
| - name: Install Python build backend | ||
| run: python -m pip install --upgrade build | ||
| - name: Install nim | ||
| run: | | ||
| set -euo pipefail | ||
| wget https://nim-lang.org/download/nim-1.6.20.tar.xz | ||
| tar xf nim-1.6.20.tar.xz | ||
| pushd nim-1.6.20 | ||
| sh build.sh | ||
| bin/nim c koch | ||
| ./koch boot -d:release | ||
| export PATH="$(pwd)/bin:${PATH}" | ||
| popd | ||
| - name: Get sqlite | ||
| run: | | ||
| set -euo pipefail | ||
| wget https://sqlite.org/2025/sqlite-amalgamation-3500400.zip | ||
| unzip sqlite-amalgamation-3500400.zip | ||
| cp sqlite-amalgamation-3500400/sqlite3.c . | ||
| - name: Install libssl (Linux) | ||
| if: ${{ matrix.target_os == 'linux' }} | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y libssl-dev | ||
| - name: Install libssl (MacOS) | ||
| if: ${{ matrix.target_os == 'macos' }} | ||
| run: | | ||
| git clone https://github.com/openssl/openssl | ||
| pushd openssl | ||
| git checkout openssl-3.5.4 | ||
| ./Configure --prefix=$(pwd)/../openssl-res | ||
| make -j$(sysctl -n hw.ncpu) | ||
| make install_sw | ||
| popd | ||
| - name: Install zlib (Linux) | ||
| if: ${{ matrix.target_os == 'linux' }} | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y zlib1g-dev | ||
| - name: Install zlib (MacOS) | ||
| if: ${{ matrix.target_os == 'macos' }} | ||
| run: | | ||
| wget https://zlib.net/zlib-1.3.2.tar.gz | ||
| tar xf zlib-1.3.2.tar.gz | ||
| pushd zlib-1.3.2 | ||
| ./configure --static --prefix=$(pwd)/../zlib-res | ||
| make -j$(sysctl -n hw.ncpu) | ||
| make install | ||
| popd | ||
| - name: Build codetracer binaries (Linux) | ||
| if: ${{ matrix.target_os == 'linux' }} | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| TARGET_DIR="build-python/src/ct/bin/${{ matrix.target_os }}-${{ matrix.arch }}" | ||
| mkdir -p "${TARGET_DIR}" | ||
| ./nim-1.6.20/bin/nim -d:release \ | ||
| --d:asyncBackend=asyncdispatch \ | ||
| --dynlibOverride:std -d:staticStd \ | ||
| --gc:refc --hints:on --warnings:off \ | ||
| --boundChecks:on \ | ||
| -d:useOpenssl3 \ | ||
| -d:ssl \ | ||
| -d:chronicles_sinks=json -d:chronicles_line_numbers=true \ | ||
| -d:chronicles_timestamps=UnixTime \ | ||
| -d:ctTest -d:testing --hint"[XDeclaredButNotUsed]":off \ | ||
| -d:builtWithNix \ | ||
| -d:ctEntrypoint \ | ||
| -d:pythonPackage \ | ||
| -d:linksPathConst=.. \ | ||
| -d:libcPath=libc \ | ||
| -d:pathToNodeModules=../node_modules \ | ||
| --nimcache:nimcache \ | ||
| -d:staticSqlite \ | ||
| -d:useLibzipSrc \ | ||
| --passL:"-Wl,-Bstatic -L/usr/lib/x86_64-linux-gnu -l:libz.a -Wl,-Bdynamic" \ | ||
| --dynlibOverride:ssl --dynlibOverride:crypto \ | ||
| --passL:"-Wl,-Bstatic -L/usr/lib/x86_64-linux-gnu -l:libssl.a -l:libcrypto.a -Wl,-Bdynamic" \ | ||
| --out:"${TARGET_DIR}/ct" c ./src/ct/codetracer.nim | ||
| ./nim-1.6.20/bin/nim \ | ||
| -d:release -d:asyncBackend=asyncdispatch \ | ||
| --gc:refc --hints:off --warnings:off \ | ||
| --debugInfo --lineDir:on \ | ||
| --boundChecks:on --stacktrace:on --linetrace:on \ | ||
| -d:chronicles_sinks=json -d:chronicles_line_numbers=true \ | ||
| -d:chronicles_timestamps=UnixTime \ | ||
| -d:ssl \ | ||
| -d:ctTest -d:testing --hint"[XDeclaredButNotUsed]":off \ | ||
| -d:linksPathConst=.. \ | ||
| -d:libcPath=libc \ | ||
| -d:builtWithNix \ | ||
| -d:ctEntrypoint \ | ||
| -d:pythonPackage \ | ||
| --nimcache:nimcache \ | ||
| -d:staticSqlite \ | ||
| -d:useLibzipSrc \ | ||
| --passL:"-Wl,-Bstatic -L/usr/lib/x86_64-linux-gnu -l:libz.a -Wl,-Bdynamic" \ | ||
| --dynlibOverride:ssl --dynlibOverride:crypto \ | ||
| --passL:"-Wl,-Bstatic -L/usr/lib/x86_64-linux-gnu -l:libssl.a -l:libcrypto.a -Wl,-Bdynamic" \ | ||
| --out:"${TARGET_DIR}/db-backend-record" c ./src/ct/db_backend_record.nim | ||
| ./build-python/scripts/download_ct_remote.sh \ | ||
| "${{ matrix.target_os }}" \ | ||
| "${{ matrix.arch }}" \ | ||
| "${TARGET_DIR}" | ||
| - name: Build codetracer binaries (MacOS) | ||
| if: ${{ matrix.target_os == 'macos' }} | ||
| run: | | ||
| set -euo pipefail | ||
| TARGET_DIR="build-python/src/ct/bin/${{ matrix.target_os }}-${{ matrix.arch }}" | ||
| mkdir -p "${TARGET_DIR}" | ||
| ./nim-1.6.20/bin/nim -d:release \ | ||
| --d:asyncBackend=asyncdispatch \ | ||
| --dynlibOverride:std -d:staticStd \ | ||
| --gc:refc --hints:on --warnings:off \ | ||
| --boundChecks:on \ | ||
| -d:useOpenssl3 \ | ||
| -d:ssl \ | ||
| -d:chronicles_sinks=json -d:chronicles_line_numbers=true \ | ||
| -d:chronicles_timestamps=UnixTime \ | ||
| -d:ctTest -d:testing --hint"[XDeclaredButNotUsed]":off \ | ||
| -d:builtWithNix \ | ||
| -d:ctEntrypoint \ | ||
| -d:pythonPackage \ | ||
| -d:linksPathConst=.. \ | ||
| -d:libcPath=libc \ | ||
| -d:pathToNodeModules=../node_modules \ | ||
| --nimcache:nimcache \ | ||
| -d:staticSqlite \ | ||
| -d:useLibzipSrc \ | ||
| --passL:"$(pwd)/zlib-res/lib/libz.a" \ | ||
| --dynlibOverride:ssl --dynlibOverride:crypto \ | ||
| --passL:"$(pwd)/openssl-res/lib/libssl.a $(pwd)/openssl-res/lib/libcrypto.a" \ | ||
| --out:"${TARGET_DIR}/ct" c ./src/ct/codetracer.nim | ||
| ./nim-1.6.20/bin/nim \ | ||
| -d:release -d:asyncBackend=asyncdispatch \ | ||
| --gc:refc --hints:off --warnings:off \ | ||
| --debugInfo --lineDir:on \ | ||
| --boundChecks:on --stacktrace:on --linetrace:on \ | ||
| -d:chronicles_sinks=json -d:chronicles_line_numbers=true \ | ||
| -d:chronicles_timestamps=UnixTime \ | ||
| -d:ssl \ | ||
| -d:ctTest -d:testing --hint"[XDeclaredButNotUsed]":off \ | ||
| -d:linksPathConst=.. \ | ||
| -d:libcPath=libc \ | ||
| -d:builtWithNix \ | ||
| -d:ctEntrypoint \ | ||
| -d:pythonPackage \ | ||
| --nimcache:nimcache \ | ||
| -d:staticSqlite \ | ||
| -d:useLibzipSrc \ | ||
| --passL:"$(pwd)/zlib-res/lib/libz.a" \ | ||
| --dynlibOverride:ssl --dynlibOverride:crypto \ | ||
| --passL:"$(pwd)/openssl-res/lib/libssl.a $(pwd)/openssl-res/lib/libcrypto.a" \ | ||
| --out:"${TARGET_DIR}/db-backend-record" c ./src/ct/db_backend_record.nim | ||
| ./build-python/scripts/download_ct_remote.sh \ | ||
| "${{ matrix.target_os }}" \ | ||
| "${{ matrix.arch }}" \ | ||
| "${TARGET_DIR}" | ||
| - name: Build wheel | ||
| run: | | ||
| set -euo pipefail | ||
| pushd build-python | ||
| python -m build --wheel -C--build-option=--plat-name=${{ matrix.plat_name }} | ||
| popd | ||
| - name: Upload distributions | ||
| uses: actions/upload-artifact@v5 | ||
| with: | ||
| name: python-dist-${{ matrix.name }} | ||
| path: build-python/dist/*.whl | ||
| if-no-files-found: error | ||
| appimage-build: | ||
| runs-on: [self-hosted, nixos] | ||
| needs: | ||
| - lint-bash | ||
| - lint-nim | ||
| - lint-nix | ||
| - lint-rust | ||
| - lint-ui-tests | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Install Nix | ||
| uses: ./.github/actions/setup-nix | ||
| with: | ||
| cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
| cachix-cache: ${{ vars.CACHIX_CACHE }} | ||
| trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }} | ||
| substituters: ${{ vars.SUBSTITUTERS }} | ||
| gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: "Import GPG key for signing commits" | ||
| id: import-gpg | ||
| uses: crazy-max/ghaction-import-gpg@v6 | ||
| with: | ||
| gpg_private_key: ${{ secrets.CODETRACER_AUR_GPG_PRIVATE_KEY }} | ||
| passphrase: ${{ secrets.CODETRACER_AUR_GPG_PRIVATE_KEY_PASS }} | ||
| git_config_global: true | ||
| git_user_signingkey: true | ||
| git_commit_gpgsign: true | ||
| - name: Build | ||
| run: "nix develop .#devShells.x86_64-linux.default --command ./ci/build/appimage.sh" | ||
| - name: Upload artifact | ||
| env: | ||
| AWS_ACCESS_KEY_ID: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY_ID }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY }} | ||
| run: | | ||
| nix develop .#devShells.x86_64-linux.default --command gpg --armor --detach-sign CodeTracer.AppImage | ||
| nix develop .#devShells.x86_64-linux.default --command aws --endpoint-url=${{ secrets.R2_CODETRACER_BUCKET_S3_ENDPOINT }} s3 cp CodeTracer.AppImage s3://${{ vars.R2_CODETRACER_BUCKET_NAME }}/CodeTracer-${{ github.ref_name }}-amd64.AppImage | ||
| nix develop .#devShells.x86_64-linux.default --command aws --endpoint-url=${{ secrets.R2_CODETRACER_BUCKET_S3_ENDPOINT }} s3 cp CodeTracer.AppImage.asc s3://${{ vars.R2_CODETRACER_BUCKET_NAME }}/CodeTracer-${{ github.ref_name }}-amd64.AppImage.asc | ||
| dmg-build: | ||
| runs-on: macos-latest | ||
| needs: | ||
| - lint-bash | ||
| - lint-nim | ||
| - lint-nix | ||
| - lint-rust | ||
| - lint-ui-tests | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: "Import GPG key for signing commits" | ||
| id: import-gpg | ||
| uses: crazy-max/ghaction-import-gpg@v6 | ||
| with: | ||
| gpg_private_key: ${{ secrets.CODETRACER_AUR_GPG_PRIVATE_KEY }} | ||
| passphrase: ${{ secrets.CODETRACER_AUR_GPG_PRIVATE_KEY_PASS }} | ||
| git_config_global: true | ||
| git_user_signingkey: true | ||
| git_commit_gpgsign: true | ||
| - name: Build | ||
| run: ./ci/build/dmg.sh | ||
| - name: Install AWS CLI | ||
| run: brew install awscli | ||
| - name: Upload artifact | ||
| env: | ||
| AWS_ACCESS_KEY_ID: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY_ID }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY }} | ||
| run: | | ||
| gpg --armor --detach-sign non-nix-build/CodeTracer.dmg | ||
| # for now apply workaround from https://community.cloudflare.com/t/an-error-occurred-internalerror-when-calling-the-putobject-operation/764905/11: | ||
| # adding `--checksum-algorithm CRC32` | ||
| aws --endpoint-url=${{ secrets.R2_CODETRACER_BUCKET_S3_ENDPOINT }} s3 cp ./non-nix-build/CodeTracer.dmg s3://${{ vars.R2_CODETRACER_BUCKET_NAME }}/CodeTracer-${{ github.ref_name }}-arm64.dmg --checksum-algorithm CRC32 | ||
| aws --endpoint-url=${{ secrets.R2_CODETRACER_BUCKET_S3_ENDPOINT }} s3 cp ./non-nix-build/CodeTracer.dmg.asc s3://${{ vars.R2_CODETRACER_BUCKET_NAME }}/CodeTracer-${{ github.ref_name }}-arm64.dmg.asc --checksum-algorithm CRC32 | ||
| dmg-lib-check: | ||
| runs-on: macos-latest | ||
| needs: | ||
| - dmg-build | ||
| steps: | ||
| - name: Install AWS CLI | ||
| run: brew install awscli | ||
| - name: Install 7zip | ||
| run: brew install sevenzip | ||
| - name: Download artifact | ||
| env: | ||
| AWS_ACCESS_KEY_ID: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY_ID }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY }} | ||
| run: | | ||
| aws --endpoint-url=${{ secrets.R2_CODETRACER_BUCKET_S3_ENDPOINT }} s3 cp s3://${{ vars.R2_CODETRACER_BUCKET_NAME }}/CodeTracer-${{ github.ref_name }}-arm64.dmg ./CodeTracer.dmg | ||
| - name: Extract dmg | ||
| env: | ||
| AWS_ACCESS_KEY_ID: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY_ID }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY }} | ||
| run: | | ||
| 7zz x ./CodeTracer.dmg | ||
| - name: Check if ct starts | ||
| env: | ||
| AWS_ACCESS_KEY_ID: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY_ID }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY }} | ||
| run: | | ||
| ./CodeTracer/CodeTracer.app/Contents/MacOS/bin/ct --version | ||
| appimage-lib-check: | ||
| runs-on: ubuntu-latest | ||
| needs: | ||
| - appimage-build | ||
| steps: | ||
| - name: Install AWS CLI | ||
| if: ${{ startsWith(github.ref, 'refs/tags/') && !github.event['codetracer-ci'] }} | ||
| run: sudo snap install aws-cli --classic | ||
| - name: Install FUSE | ||
| run: sudo apt-get install -y fuse libfuse2 | ||
| - name: Download artifact | ||
| env: | ||
| AWS_ACCESS_KEY_ID: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY_ID }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY }} | ||
| run: | | ||
| aws --endpoint-url=${{ secrets.R2_CODETRACER_BUCKET_S3_ENDPOINT }} s3 cp s3://${{ vars.R2_CODETRACER_BUCKET_NAME }}/CodeTracer-${{ github.ref_name }}-amd64.AppImage ./CodeTracer.AppImage | ||
| - name: Check if ct starts | ||
| env: | ||
| AWS_ACCESS_KEY_ID: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY_ID }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY }} | ||
| run: | | ||
| chmod +x ./CodeTracer.AppImage | ||
| ./CodeTracer.AppImage --version | ||
| test-non-gui: | ||
| runs-on: [self-hosted, nixos] | ||
| needs: | ||
| - dev-build | ||
| - nix-build | ||
| - appimage-build | ||
| - dmg-build | ||
| - build-python-packages | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Install Nix | ||
| uses: ./.github/actions/setup-nix | ||
| with: | ||
| cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
| cachix-cache: ${{ vars.CACHIX_CACHE }} | ||
| trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }} | ||
| substituters: ${{ vars.SUBSTITUTERS }} | ||
| gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - run: "nix develop .#devShells.x86_64-linux.default --command just test" | ||
| test-ui-tests: | ||
| runs-on: [self-hosted, nixos] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Install Nix | ||
| uses: ./.github/actions/setup-nix | ||
| with: | ||
| cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
| cachix-cache: ${{ vars.CACHIX_CACHE }} | ||
| trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }} | ||
| substituters: ${{ vars.SUBSTITUTERS }} | ||
| gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Build CodeTracer | ||
| run: nix build --print-build-logs '.?submodules=1#codetracer' --override-input codetracer-ruby-recorder path:./libs/codetracer-ruby-recorder | ||
| - name: Run C# UI tests | ||
| env: | ||
| CODETRACER_E2E_CT_PATH: ${{ github.workspace }}/result/bin/ct | ||
| run: "nix develop .#ui-tests --command ./ci/test/ui-tests.sh" | ||
| test-ui-tests-python: | ||
| runs-on: [self-hosted, nixos] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Install Nix | ||
| uses: ./.github/actions/setup-nix | ||
| with: | ||
| cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
| cachix-cache: ${{ vars.CACHIX_CACHE }} | ||
| trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }} | ||
| substituters: ${{ vars.SUBSTITUTERS }} | ||
| gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Build CodeTracer | ||
| run: nix build --print-build-logs '.?submodules=1#codetracer' --override-input codetracer-ruby-recorder path:./libs/codetracer-ruby-recorder | ||
| - name: Run Python UI smoke tests | ||
| env: | ||
| CODETRACER_E2E_CT_PATH: ${{ github.workspace }}/result/bin/ct | ||
| run: "nix develop .#devShells.x86_64-linux.default --command ./ci/test/ui-tests-python.sh" | ||
| test-ui-tests-ruby: | ||
| runs-on: [self-hosted, nixos] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Install Nix | ||
| uses: ./.github/actions/setup-nix | ||
| with: | ||
| cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
| cachix-cache: ${{ vars.CACHIX_CACHE }} | ||
| trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }} | ||
| substituters: ${{ vars.SUBSTITUTERS }} | ||
| gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Build CodeTracer | ||
| run: nix build --print-build-logs '.?submodules=1#codetracer' --override-input codetracer-ruby-recorder path:./libs/codetracer-ruby-recorder | ||
| - name: Run Ruby UI smoke tests | ||
| timeout-minutes: 15 | ||
| env: | ||
| CODETRACER_E2E_CT_PATH: ${{ github.workspace }}/result/bin/ct | ||
| run: "nix develop .#devShells.x86_64-linux.default --command ./ci/test/ui-tests-ruby.sh" | ||
| test-ui-tests-rr-languages: | ||
| runs-on: [self-hosted, nixos] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Install Nix | ||
| uses: ./.github/actions/setup-nix | ||
| with: | ||
| cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
| cachix-cache: ${{ vars.CACHIX_CACHE }} | ||
| trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }} | ||
| substituters: ${{ vars.SUBSTITUTERS }} | ||
| gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Build CodeTracer | ||
| run: nix build --print-build-logs '.?submodules=1#codetracer' --override-input codetracer-ruby-recorder path:./libs/codetracer-ruby-recorder | ||
| - name: Resolve rr-backend ref | ||
| id: resolve-ref | ||
| run: | | ||
| if [[ -f .github/rr-backend-pin.txt ]]; then | ||
| REF="$(head -1 .github/rr-backend-pin.txt | tr -d '[:space:]')" | ||
| fi | ||
| REF="${REF:-main}" | ||
| echo "ref=$REF" >> "$GITHUB_OUTPUT" | ||
| echo "Resolved rr-backend ref: $REF" | ||
| - name: Clone rr-backend as sibling | ||
| run: | | ||
| REF="${{ steps.resolve-ref.outputs.ref }}" | ||
| echo "Cloning codetracer-rr-backend at ref: $REF" | ||
| # Rewrite GitHub URLs for authenticated cloning of private repos | ||
| git config --global url."https://x-access-token:${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}@github.com/".insteadOf "git@github.com:" | ||
| git config --global url."https://x-access-token:${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}@github.com/".insteadOf "ssh://git@github.com/" | ||
| git config --global url."https://x-access-token:${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}@github.com/".insteadOf "https://github.com/" | ||
| # Clone as a sibling directory so the codetracer shell hook auto-detects it | ||
| # (shellHook checks for ../codetracer-rr-backend/target/debug/ct-rr-support) | ||
| SIBLING_DIR="${GITHUB_WORKSPACE}/../codetracer-rr-backend" | ||
| rm -rf "$SIBLING_DIR" | ||
| git clone \ | ||
| "https://x-access-token:${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}@github.com/metacraft-labs/codetracer-rr-backend.git" \ | ||
| "$SIBLING_DIR" | ||
| cd "$SIBLING_DIR" | ||
| git checkout "$REF" | ||
| git submodule init | ||
| for url in $(git config --get-regexp '^submodule\..*\.url$' | grep -E 'git@github\.com:|https://github\.com/' | cut -d' ' -f1); do | ||
| old_url=$(git config --get "$url") | ||
| new_url=$(echo "$old_url" \ | ||
| | sed "s|git@github.com:|https://x-access-token:${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}@github.com/|" \ | ||
| | sed "s|https://github.com/|https://x-access-token:${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}@github.com/|") | ||
| git config "$url" "$new_url" | ||
| done | ||
| git submodule update --recursive | ||
| # Rewrite .gitmodules SSH→HTTPS so nix's internal git fetcher can resolve them | ||
| sed -i 's|git@github.com:|https://github.com/|g' .gitmodules | ||
| sed -i 's|ssh://git@github.com/|https://github.com/|g' .gitmodules | ||
| git add .gitmodules | ||
| git -c user.name="CI" -c user.email="ci@local" commit --no-gpg-sign -m "CI: rewrite submodule URLs to HTTPS" | ||
| - name: Build ct-rr-support | ||
| run: | | ||
| SIBLING_DIR="${GITHUB_WORKSPACE}/../codetracer-rr-backend" | ||
| cd "${SIBLING_DIR}" | ||
| # PRJ_ROOT may not be set (it comes from direnv), so the shellHook's | ||
| # symlink creation can fail silently. Build first, then create the | ||
| # rr/dlv/gdb symlinks manually by querying the nix shell for paths. | ||
| nix develop . --command cargo build | ||
| nix develop . --command bash -c ' | ||
| ln -sf "$(command -v rr)" target/debug/rr | ||
| ln -sf "$(command -v dlv)" target/debug/dlv 2>/dev/null || true | ||
| ln -sf "$(command -v gdb)" target/debug/gdb 2>/dev/null || true | ||
| ' | ||
| ls -la target/debug/rr target/debug/ct-rr-support | ||
| - name: Run C smoke tests | ||
| env: | ||
| CODETRACER_E2E_CT_PATH: ${{ github.workspace }}/result/bin/ct | ||
| CODETRACER_RR_SOFT_MODE: "1" | ||
| run: "nix develop .#devShells.x86_64-linux.default --command ./ci/test/ui-tests-c.sh" | ||
| - name: Run Rust smoke tests | ||
| env: | ||
| CODETRACER_E2E_CT_PATH: ${{ github.workspace }}/result/bin/ct | ||
| CODETRACER_RR_SOFT_MODE: "1" | ||
| # rustup override is directory-specific and won't apply when | ||
| # ct-rr-support builds from a different cwd | ||
| RUSTUP_TOOLCHAIN: "1.89" | ||
| run: "nix develop .#devShells.x86_64-linux.default --command ./ci/test/ui-tests-rust.sh" | ||
| - name: Run Go smoke tests | ||
| env: | ||
| CODETRACER_E2E_CT_PATH: ${{ github.workspace }}/result/bin/ct | ||
| CODETRACER_RR_SOFT_MODE: "1" | ||
| run: "nix develop .#devShells.x86_64-linux.default --command ./ci/test/ui-tests-go.sh" | ||
| - name: Run Nim smoke tests | ||
| env: | ||
| CODETRACER_E2E_CT_PATH: ${{ github.workspace }}/result/bin/ct | ||
| CODETRACER_RR_SOFT_MODE: "1" | ||
| run: "nix develop .#devShells.x86_64-linux.default --command ./ci/test/ui-tests-nim.sh" | ||
| publish-pypi: | ||
| needs: | ||
| - build-python-packages | ||
| - test-non-gui | ||
| - test-ui-tests | ||
| - create-release | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Download built distributions | ||
| uses: actions/download-artifact@v6 | ||
| with: | ||
| path: dist | ||
| merge-multiple: true | ||
| - name: Publish to TestPyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| packages_dir: dist | ||
| repository-url: https://test.pypi.org/legacy/ | ||
| - name: Publish to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| packages_dir: dist | ||
| push-to-cachix: | ||
| runs-on: [self-hosted, nixos] | ||
| needs: | ||
| - test-non-gui | ||
| - test-ui-tests | ||
| - appimage-lib-check | ||
| - dmg-lib-check | ||
| if: "github.ref == 'refs/heads/main' && ${{ !github.event.codetracer-ci }}" | ||
|
Check warning on line 840 in .github/workflows/codetracer.yml
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Install Nix | ||
| uses: ./.github/actions/setup-nix | ||
| with: | ||
| cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
| cachix-cache: ${{ vars.CACHIX_CACHE }} | ||
| trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }} | ||
| substituters: ${{ vars.SUBSTITUTERS }} | ||
| gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - run: "nix develop .#devShells.x86_64-linux.default --command ./ci/deploy/build-nix-and-push-to-cachix.sh" | ||
| build-and-deploy-docs: | ||
| runs-on: [self-hosted, nixos] | ||
| needs: [push-to-cachix] | ||
| if: ${{ github.ref == 'refs/heads/main' && !github.event['codetracer-ci'] }} | ||
| permissions: | ||
| contents: "write" | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Install Nix | ||
| uses: ./.github/actions/setup-nix | ||
| with: | ||
| cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
| cachix-cache: ${{ vars.CACHIX_CACHE }} | ||
| trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }} | ||
| substituters: ${{ vars.SUBSTITUTERS }} | ||
| gh-token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| git config init.defaultBranch main | ||
| git remote set-url origin https://x-access-token:${{ secrets.CODETRACER_PUSH_GITHUB_TOKEN }}@github.com/metacraft-labs/codetracer | ||
| nix develop .#devShells.x86_64-linux.default --command ./ci/deploy/docs.sh | ||
| push-tag: | ||
| runs-on: [ self-hosted, nixos ] | ||
| needs: [ dev-build, nix-build, appimage-build, dmg-build ] | ||
| permissions: | ||
| contents: "write" | ||
| outputs: | ||
| tag: ${{ steps.tag.outputs.tag }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Install Nix | ||
| uses: metacraft-labs/nixos-modules/.github/install-nix@main | ||
| with: | ||
| cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
| cachix-cache: ${{ vars.CACHIX_CACHE }} | ||
| trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }} | ||
| substituters: ${{ vars.SUBSTITUTERS }} | ||
| - name: Configure Nix for private repos | ||
| run: | | ||
| mkdir -p ~/.config/nix | ||
| echo "access-tokens = github.com=${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}" >> ~/.config/nix/nix.conf | ||
| git config --global url."https://x-access-token:${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}@github.com/".insteadOf "git@github.com:" | ||
| git config --global url."https://x-access-token:${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}@github.com/".insteadOf "ssh://git@github.com/" | ||
| git config --global url."https://x-access-token:${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}@github.com/".insteadOf "https://github.com/" | ||
| - name: Create tag | ||
| if: ${{ github.ref == 'refs/heads/main' }} | ||
| id: tag | ||
| run: | | ||
| YEAR=$(bash -c 'grep "CodeTracerYear\*" src/ct/version.nim | sed "s/.*CodeTracerYear\* = //g"') | ||
| MONTH=$(bash -c "printf '%02d' \$(grep \"CodeTracerMonth\*\" src/ct/version.nim | sed \"s/.*CodeTracerMonth\* = //g\")") | ||
| BUILD=$(bash -c 'grep "CodeTracerBuild\*" src/ct/version.nim | sed "s/.*CodeTracerBuild\* = //g"') | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| git config init.defaultBranch main | ||
| git remote set-url origin https://x-access-token:${{ secrets.CODETRACER_PUSH_GITHUB_TOKEN }}@github.com/metacraft-labs/codetracer | ||
| git tag -a "$YEAR.$MONTH.$BUILD" -m "Release $YEAR.$MONTH.$BUILD" || echo "Tag already exists" | ||
| (git push origin "$YEAR.$MONTH.$BUILD" && echo "tag=$YEAR.$MONTH.$BUILD" >> $GITHUB_OUTPUT) || echo "Tag already exists" | ||
| create-release: | ||
| runs-on: [ self-hosted, nixos ] | ||
| needs: [ push-tag ] | ||
| if: ${{ ((startsWith(github.ref, 'refs/tags/') && !contains(github.ref_name, '-')) || needs.push-tag.outputs.tag != '') && !github.event['codetracer-ci'] }} | ||
| permissions: | ||
| contents: "write" | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| token: ${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }} | ||
| - name: Install Nix | ||
| uses: metacraft-labs/nixos-modules/.github/install-nix@main | ||
| with: | ||
| cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
| cachix-cache: ${{ vars.CACHIX_CACHE }} | ||
| trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }} | ||
| substituters: ${{ vars.SUBSTITUTERS }} | ||
| - name: Configure Nix for private repos | ||
| run: | | ||
| mkdir -p ~/.config/nix | ||
| echo "access-tokens = github.com=${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}" >> ~/.config/nix/nix.conf | ||
| git config --global url."https://x-access-token:${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}@github.com/".insteadOf "git@github.com:" | ||
| git config --global url."https://x-access-token:${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}@github.com/".insteadOf "ssh://git@github.com/" | ||
| git config --global url."https://x-access-token:${{ secrets.GH_READ_METACRAFT_PRIVATE_REPOS }}@github.com/".insteadOf "https://github.com/" | ||
| - name: "Import GPG key for signing commits" | ||
| id: import-gpg | ||
| uses: crazy-max/ghaction-import-gpg@v6 | ||
| with: | ||
| gpg_private_key: ${{ secrets.CODETRACER_AUR_GPG_PRIVATE_KEY }} | ||
| passphrase: ${{ secrets.CODETRACER_AUR_GPG_PRIVATE_KEY_PASS }} | ||
| git_config_global: true | ||
| git_user_signingkey: true | ||
| git_commit_gpgsign: true | ||
| - name: Create resource tarball | ||
| run: | | ||
| nix develop .#devShells.x86_64-linux.default --command bash -c "tar cfJ resources.tar.xz resources/" | ||
| nix develop .#devShells.x86_64-linux.default --command bash -c "gpg --detach-sign resources.tar.xz" | ||
| - name: Upload latest | ||
| env: | ||
| AWS_ACCESS_KEY_ID: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY_ID }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY }} | ||
| run: | | ||
| nix develop .#devShells.x86_64-linux.default --command wget "https://downloads.codetracer.com/CodeTracer-main-arm64.dmg" | ||
| nix develop .#devShells.x86_64-linux.default --command wget "https://downloads.codetracer.com/CodeTracer-main-arm64.dmg.asc" | ||
| nix develop .#devShells.x86_64-linux.default --command wget "https://downloads.codetracer.com/CodeTracer-main-amd64.AppImage" | ||
| nix develop .#devShells.x86_64-linux.default --command wget "https://downloads.codetracer.com/CodeTracer-main-amd64.AppImage.asc" | ||
| nix develop .#devShells.x86_64-linux.default --command aws --endpoint-url=${{ secrets.R2_CODETRACER_BUCKET_S3_ENDPOINT }} s3 cp CodeTracer-main-arm64.dmg s3://${{ vars.R2_CODETRACER_BUCKET_NAME }}/CodeTracer-${{ needs.push-tag.outputs.tag }}-arm64.dmg --checksum-algorithm CRC32 | ||
| nix develop .#devShells.x86_64-linux.default --command aws --endpoint-url=${{ secrets.R2_CODETRACER_BUCKET_S3_ENDPOINT }} s3 cp CodeTracer-main-arm64.dmg.asc s3://${{ vars.R2_CODETRACER_BUCKET_NAME }}/CodeTracer-${{ needs.push-tag.outputs.tag }}-arm64.dmg.asc --checksum-algorithm CRC32 | ||
| nix develop .#devShells.x86_64-linux.default --command aws --endpoint-url=${{ secrets.R2_CODETRACER_BUCKET_S3_ENDPOINT }} s3 cp CodeTracer-main-amd64.AppImage s3://${{ vars.R2_CODETRACER_BUCKET_NAME }}/CodeTracer-${{ needs.push-tag.outputs.tag }}-amd64.AppImage --checksum-algorithm CRC32 | ||
| nix develop .#devShells.x86_64-linux.default --command aws --endpoint-url=${{ secrets.R2_CODETRACER_BUCKET_S3_ENDPOINT }} s3 cp CodeTracer-main-amd64.AppImage.asc s3://${{ vars.R2_CODETRACER_BUCKET_NAME }}/CodeTracer-${{ needs.push-tag.outputs.tag }}-amd64.AppImage.asc --checksum-algorithm CRC32 | ||
| nix develop .#devShells.x86_64-linux.default --command aws --endpoint-url=${{ secrets.R2_CODETRACER_BUCKET_S3_ENDPOINT }} s3 cp CodeTracer-main-arm64.dmg s3://${{ vars.R2_CODETRACER_BUCKET_NAME }}/CodeTracer-latest-arm64.dmg --checksum-algorithm CRC32 | ||
| nix develop .#devShells.x86_64-linux.default --command aws --endpoint-url=${{ secrets.R2_CODETRACER_BUCKET_S3_ENDPOINT }} s3 cp CodeTracer-main-arm64.dmg.asc s3://${{ vars.R2_CODETRACER_BUCKET_NAME }}/CodeTracer-latest-arm64.dmg.asc --checksum-algorithm CRC32 | ||
| nix develop .#devShells.x86_64-linux.default --command aws --endpoint-url=${{ secrets.R2_CODETRACER_BUCKET_S3_ENDPOINT }} s3 cp CodeTracer-main-amd64.AppImage s3://${{ vars.R2_CODETRACER_BUCKET_NAME }}/CodeTracer-latest-amd64.AppImage --checksum-algorithm CRC32 | ||
| nix develop .#devShells.x86_64-linux.default --command aws --endpoint-url=${{ secrets.R2_CODETRACER_BUCKET_S3_ENDPOINT }} s3 cp CodeTracer-main-amd64.AppImage.asc s3://${{ vars.R2_CODETRACER_BUCKET_NAME }}/CodeTracer-latest-amd64.AppImage.asc --checksum-algorithm CRC32 | ||
| - name: Get changelog text | ||
| id: changelog | ||
| run: | | ||
| nix develop .#devShells.x86_64-linux.default --command bash -c "awk '/^## /{if (p) exit; p=1} p' CHANGELOG.md > release_changelog.md" | ||
| echo "\ | ||
| We're actively working on multiple exciting features, which are not fully released yet. Stay tuned! | ||
| Available downloads: | ||
| <a href="https://downloads.codetracer.com/CodeTracer-${{ needs.push-tag.outputs.tag }}-arm64.dmg"><img width="75px" height="100px" src="https://upload.wikimedia.org/wikipedia/commons/1/1b/Apple_logo_grey.svg"></a> | ||
| <a href="https://deb.codetracer.com/"><img width="100px" height="100px" src="https://upload.wikimedia.org/wikipedia/commons/9/9e/UbuntuCoF.svg"></a> | ||
| <a href="https://deb.codetracer.com/"><img width="100px" height="100px" src="https://upload.wikimedia.org/wikipedia/commons/6/66/Openlogo-debianV2.svg"></a> | ||
| <a href="https://rpm.codetracer.com/"><img width="100px" height="100px" src="https://upload.wikimedia.org/wikipedia/commons/d/d8/Red_Hat_logo.svg"></a> | ||
| <a href="https://rpm.codetracer.com/"><img width="100px" height="100px" src="https://upload.wikimedia.org/wikipedia/commons/3/3f/Fedora_logo.svg"></a> | ||
| <a href="https://github.com/metacraft-labs/metacraft-overlay"><img width="100px" height="100px" src="https://upload.wikimedia.org/wikipedia/commons/4/48/Gentoo_Linux_logo_matte.svg"></a> | ||
| <a href="https://aur.archlinux.org/packages/codetracer"><img width="100px" height="100px" src="https://upload.wikimedia.org/wikipedia/commons/1/13/Arch_Linux_%22Crystal%22_icon.svg"></a> | ||
| <a href="https://downloads.codetracer.com/CodeTracer-${{ needs.push-tag.outputs.tag }}-amd64.AppImage"><img width="100px" height="100px" src="https://upload.wikimedia.org/wikipedia/commons/7/73/App-image-logo.svg"></a> | ||
| Key signatures: | ||
| [](https://downloads.codetracer.com/CodeTracer-${{ needs.push-tag.outputs.tag }}-arm64.dmg.asc) | ||
| [](https://downloads.codetracer.com/CodeTracer-${{ needs.push-tag.outputs.tag }}-amd64.AppImage.asc) | ||
| [](https://downloads.codetracer.com/CodeTracer.pub.asc)" >> release_changelog.md | ||
| - name: Create Release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| body_path: "release_changelog.md" | ||
| draft: true | ||
| prerelease: false | ||
| files: | | ||
| resources.tar.xz | ||
| resources.tar.xz.asc | ||
| generate_release_notes: false | ||
| tag_name: "${{ needs.push-tag.outputs.tag }}" | ||