ebbflow-io / cargo-deb-amd64-ubuntu

Action for creating statically-linked .deb package for Rust projects using cargo deb
https://ebbflow.io
4 stars 12 forks source link

Does not support Rust 2021 edition #1

Open jqnatividad opened 2 years ago

jqnatividad commented 2 years ago

Here's the GH Actions logfile:

Run ebbflow-io/cargo-deb-amd64-ubuntu@1.0
/usr/bin/docker run --name ebbflowcargodebamd64ubuntu10_7f5ae9 --label e28490 --workdir /github/workspace --rm -e INPUT_CMD -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/qsv/qsv":"/github/workspace" ebbflow/cargo-deb-amd64-ubuntu:1.0  "cargo deb --target=x86_64-unknown-linux-musl"
+ ln -s /root/.cargo /github/home/.cargo
+ ln -s /root/.rustup /github/home/.rustup
+ cd /github/workspace
+ sh -c cargo deb --target=x86_64-unknown-linux-musl
cargo-deb: cargo (metadata): error: failed to parse manifest at `/github/workspace/Cargo.toml`

Caused by:
  failed to parse the `edition` key

Caused by:
  this version of Cargo is older than the `2021` edition, and only supports `2015` and `2018` editions.
janstarke commented 2 years ago

Mitigation:

add a pre.sh to the cmd:

    - name: build x86_64-unknown-linux-musl
      uses: ebbflow-io/cargo-deb-amd64-ubuntu@1.0
      with:
        cmd: bash build/pre.sh; cargo deb --target=x86_64-unknown-linux-musl

content of build/pre.sh:

rustup update stable
rustup default stable
rustup target add x86_64-unknown-linux-musl