Skip to content

Simplify CI by moving some steps to the justfile #2492

@nyurik

Description

@nyurik

One justfile benefit is to be able to run the same CI commands locally - i.e. CI should call just <command> as much as possible.

I think at least this code should be moved to a justfile recipe (recipe name is TBD). Note that the tr usage can be done by the justfile's case conversion functions.

All the mv commands should also be its own recipe - because it is being used by another CI step as well.

      - run: rustup target add ${{ matrix.target }}
      - name: Build ${{ matrix.target }}
        run: |
          export "CARGO_TARGET_$(echo ${{ matrix.target }} | tr 'a-z-' 'A-Z_')_RUSTFLAGS"='-C strip=debuginfo'
          cargo zigbuild --release --target ${{ matrix.target }} --workspace --locked

      - name: Move the artefacts to the expected place
        run: |
          mkdir -p target_releases/
          mv target/${{ matrix.target }}/release/martin target_releases/
          mv target/${{ matrix.target }}/release/martin-cp target_releases/
          mv target/${{ matrix.target }}/release/mbtiles target_releases/

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions