Skip to content

Commit df32e00

Browse files
authored
Merge branch 'main' into musl-1.1.24
2 parents ce1548b + 0b3abed commit df32e00

File tree

124 files changed

+7166
-1762
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+7166
-1762
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @rust-embedded/tools @Dylan-DPC
1+
* @cross-rs/maintainers
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
name: Blank Issue
3+
about: Create a blank issue.
4+
---
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
name: Issue report
2+
description: Report something that is broken, missing or wrong.
3+
4+
body:
5+
- type: checkboxes
6+
id: acknowledgments
7+
attributes:
8+
label: Checklist
9+
options:
10+
- label: I've looked through the [issues and pull requests](https://github.com/cross-rs/cross/issues?q=) for similar reports
11+
required: true
12+
- type: textarea
13+
id: description
14+
validations:
15+
required: true
16+
attributes:
17+
label: Describe your issue
18+
description: |
19+
Write a description of your issue. Include error messages if there are any.
20+
placeholder: |
21+
Examples:
22+
- cross no longer compiles my project after upgrade.
23+
- I have trouble doing X.
24+
- Feature X has stopped working for me.
25+
26+
- type: dropdown
27+
id: target
28+
attributes:
29+
label: What target(s) are you cross-compiling for?
30+
description: You may select more than one or none if this is not applicable (N/A).
31+
multiple: true
32+
options:
33+
- aarch64-linux-android
34+
- aarch64-unknown-linux-gnu
35+
- aarch64-unknown-linux-musl
36+
- arm-linux-androideabi
37+
- arm-unknown-linux-gnueabi
38+
- arm-unknown-linux-gnueabihf
39+
- arm-unknown-linux-musleabi
40+
- arm-unknown-linux-musleabihf
41+
- armv5te-unknown-linux-gnueabi
42+
- armv5te-unknown-linux-musleabi
43+
- armv7-linux-androideabi
44+
- armv7-unknown-linux-gnueabihf
45+
- armv7-unknown-linux-musleabihf
46+
- asmjs-unknown-emscripten
47+
- i586-unknown-linux-gnu
48+
- i586-unknown-linux-musl
49+
- i686-linux-android
50+
- i686-pc-windows-gnu
51+
- i686-unknown-freebsd
52+
- i686-unknown-linux-gnu
53+
- i686-unknown-linux-musl
54+
- mips64el-unknown-linux-gnuabi64
55+
- mips64el-unknown-linux-muslabi64
56+
- mips64-unknown-linux-gnuabi64
57+
- mips64-unknown-linux-muslabi64
58+
- mipsel-unknown-linux-gnu
59+
- mipsel-unknown-linux-musl
60+
- mips-unknown-linux-gnu
61+
- mips-unknown-linux-musl
62+
- powerpc64le-unknown-linux-gnu
63+
- powerpc64-unknown-linux-gnu
64+
- powerpc-unknown-linux-gnu
65+
- riscv64gc-unknown-linux-gnu
66+
- s390x-unknown-linux-gnu
67+
- sparc64-unknown-linux-gnu
68+
- sparcv9-sun-solaris
69+
- thumbv6m-none-eabi
70+
- thumbv7em-none-eabi
71+
- thumbv7em-none-eabihf
72+
- thumbv7m-none-eabi
73+
- wasm32-unknown-emscripten
74+
- x86_64-linux-android
75+
- x86_64-pc-windows-gnu
76+
- x86_64-sun-solaris
77+
- x86_64-unknown-freebsd
78+
- x86_64-unknown-linux-gnu
79+
- x86_64-unknown-linux-musl
80+
- x86_64-unknown-netbsd
81+
- other (specify in description)
82+
83+
- type: checkboxes
84+
id: host-system
85+
attributes:
86+
label: Which operating system is the host (e.g computer cross is on) running?
87+
description: You may select more than one or none if N/A.
88+
options:
89+
- label: macOS
90+
- label: Windows
91+
- label: Linux / BSD
92+
- label: other OS (specify in description)
93+
94+
- type: checkboxes
95+
id: host-arch
96+
attributes:
97+
label: What architecture is the host?
98+
description: You may select more than one or none if N/A.
99+
options:
100+
- label: x86_64 / AMD64
101+
- label: arm32
102+
- label: arm64 (including Mac M1)
103+
104+
- type: checkboxes
105+
id: container-engine
106+
attributes:
107+
label: What container engine is cross using?
108+
description: You may select more than one or none if N/A.
109+
options:
110+
- label: docker
111+
- label: podman
112+
- label: other container engine (specify in description)
113+
114+
- type: input
115+
id: cross-version
116+
validations:
117+
required: true
118+
attributes:
119+
label: cross version
120+
description: The version of cross given with `cross -V` or `cross --version`
121+
placeholder: cross 0.4.2 (c8df353 2025-01-01)
122+
123+
- type: textarea
124+
id: mcve
125+
attributes:
126+
label: Example
127+
description: Please provide a short, complete example of the issue if possible.
128+
placeholder: |
129+
```sh
130+
git clone https://github.com/ghost/my_mcve
131+
cross build --target x86_65-unknown-linux-gnu
132+
```
133+
134+
Gives the error message `could not discover target specification`
135+
136+
- type: textarea
137+
id: additional
138+
attributes:
139+
label: Additional information / notes
140+
description: Provide any information you think is relevant to the issue
141+
placeholder: It builds on `asmjs-unknown-emscripten`

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Question?
4+
url: https://matrix.to/#/#cross-rs:matrix.org
5+
about: Reach out to us on our Matrix room if you want!
6+
- name: Question!
7+
url: https://github.com/cross-rs/cross/discussions/categories/q-a
8+
about: Or try the Q&A discussions
9+
- name: FAQ
10+
url: https://github.com/cross-rs/cross/wiki/FAQ
11+
about: Frequently Asked Questions are compiled here.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Feature Request
2+
description: Leave a feature request if you have a suggestion to improve cross and/or the rust ecosystem
3+
labels: ["feature-request"]
4+
5+
body:
6+
- type: checkboxes
7+
id: acknowledgments
8+
attributes:
9+
label: Checklist
10+
options:
11+
- label: I've looked through the [issues and pull requests](https://github.com/cross-rs/cross/issues?q=) for similar request
12+
required: true
13+
- label: This feature could be solved with a [custom docker image](https://github.com/cross-rs/cross#custom-docker-images) (optional)
14+
- type: textarea
15+
id: description
16+
validations:
17+
required: true
18+
attributes:
19+
label: Describe your request
20+
description: |
21+
Write a description of what your feature would do.
22+
If you have an idea how to solve this, feel free to leave a comment on the feature request after creating it.
23+
24+
If you have tried solved this but couldn't, explain what you tried and how or why it didn't work. We want to help!
25+
placeholder: |
26+
Examples:
27+
- cross should be able to do X.
28+
- Add more emojis to the error printing.
29+
- Implement support for cargo feature X.
30+
- type: textarea
31+
id: motivation
32+
validations:
33+
required: false
34+
attributes:
35+
label: Describe why this would be a good inclusion for `cross`
36+
description: |
37+
Why should this be added?
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Upload cargo install artifacts
2+
description: Upload `cargo install` artifacts
3+
inputs:
4+
target:
5+
description: 'Target'
6+
required: true
7+
8+
runs:
9+
using: composite
10+
steps:
11+
- name: Check if crate has binaries
12+
id: metadata
13+
run: |
14+
metadata="$(cargo metadata --format-version 1 --no-deps)"
15+
16+
package_name="$(jq -r '.packages[0].name' <<< "${metadata}")"
17+
has_binaries="$(jq '.packages[0].targets | any(.kind | contains(["bin"]))' <<< "${metadata}")"
18+
echo "::set-output name=package-name::${package_name}"
19+
echo "::set-output name=has-binaries::${has_binaries}"
20+
21+
out_dir="$(mktemp -d)"
22+
artifacts_dir="$(mktemp -d)"
23+
24+
if which cygpath; then
25+
out_dir="$(cygpath -w "${out_dir}")"
26+
artifacts_dir="$(cygpath -w "${artifacts_dir}")"
27+
fi
28+
29+
echo "::set-output name=out-dir::${out_dir}"
30+
echo "::set-output name=artifacts-dir::${artifacts_dir}"
31+
shell: bash
32+
33+
- name: Build with all features
34+
if: ${{ fromJson(steps.metadata.outputs.has-binaries) }}
35+
uses: actions-rs/cargo@v1
36+
with:
37+
command: install
38+
args: >
39+
--locked
40+
--path .
41+
--target ${{ inputs.target }}
42+
--all-features
43+
--root ${{ steps.metadata.outputs.out-dir }}
44+
--bins
45+
use-cross: true
46+
47+
- name: Archive artifacts
48+
if: ${{ fromJson(steps.metadata.outputs.has-binaries) }}
49+
id: archive
50+
run: |
51+
set -x
52+
53+
if which cygpath; then
54+
out_dir="$(cygpath -u "${out_dir}")"
55+
artifacts_dir="$(cygpath -u "${artifacts_dir}")"
56+
fi
57+
58+
artifact_name="${package_name}-${target}"
59+
artifact_path="${artifacts_dir}/${artifact_name}.tar.gz"
60+
61+
pushd "${out_dir}/bin"
62+
tar -cvzf "${artifact_path}" *
63+
popd
64+
65+
tar -tf "${artifact_path}"
66+
ls -al "${artifact_path}"
67+
68+
if which cygpath; then
69+
artifact_path="$(cygpath -w "${artifact_path}")"
70+
fi
71+
72+
echo "::set-output name=name::${artifact_name}"
73+
echo "::set-output name=path::${artifact_path}"
74+
env:
75+
package_name: ${{ steps.metadata.outputs.package-name }}
76+
out_dir: ${{ steps.metadata.outputs.out-dir }}
77+
artifacts_dir: ${{ steps.metadata.outputs.artifacts-dir }}
78+
target: ${{ inputs.target }}
79+
shell: bash
80+
81+
- name: Upload artifacts
82+
if: ${{ steps.archive.outputs.path }}
83+
uses: actions/upload-artifact@v3
84+
with:
85+
name: ${{ steps.archive.outputs.name }}
86+
path: ${{ steps.archive.outputs.path }}
87+
if-no-files-found: error
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Publish crate
2+
description: Publish crate on crates.io and create release on github
3+
inputs:
4+
cargo-registry-token:
5+
description: 'API token for crates.io'
6+
required: true
7+
8+
runs:
9+
using: composite
10+
steps:
11+
- name: Read changelog
12+
id: changelog-reader
13+
uses: mindsers/[email protected]
14+
with:
15+
# validation_depth: 10
16+
version: ${{ (github.ref_type == 'tag' && github.ref_name) || 'Unreleased' }}
17+
path: ./CHANGELOG.md
18+
19+
- name: Download artifacts
20+
id: download-artifacts
21+
uses: actions/download-artifact@v3
22+
with:
23+
path:
24+
${{ runner.temp }}/artifacts
25+
26+
- name: Log into crates.io
27+
if: github.event_name != 'pull_request'
28+
uses: actions-rs/cargo@v1
29+
with:
30+
command: login
31+
args: -- ${{ inputs.cargo-registry-token }}
32+
33+
- name: Create GitHub release
34+
if: >
35+
github.event_name == 'push' && (
36+
github.ref == format('refs/heads/{0}', github.event.repository.default_branch) ||
37+
startsWith(github.ref, 'refs/tags/v')
38+
)
39+
uses: softprops/action-gh-release@v1
40+
with:
41+
tag_name: ${{ steps.changelog-reader.outputs.version }}
42+
body: ${{ steps.changelog-reader.outputs.changes }}
43+
prerelease: ${{ steps.changelog-reader.outputs.status == 'prereleased' }}
44+
draft: ${{ steps.changelog-reader.outputs.status == 'unreleased' }}
45+
files: |
46+
${{ steps.download-artifacts.outputs.download-path }}/*/*
47+
48+
- name: Publish crate
49+
uses: actions-rs/cargo@v1
50+
with:
51+
command: publish
52+
args: ${{ !startsWith(github.ref, 'refs/tags/v') && '--dry-run' || '' }}

.github/actions/setup-rust/action.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Setup Rust
2+
description: Setup Rust with specified toolchain, target and components.
3+
inputs:
4+
toolchain:
5+
description: 'Toolchain'
6+
default: 1.58.1
7+
required: true
8+
target:
9+
description: 'Target'
10+
required: true
11+
components:
12+
description: 'Components'
13+
required: true
14+
15+
runs:
16+
using: composite
17+
steps:
18+
- name: Install Rust toolchain
19+
uses: actions-rs/toolchain@v1
20+
with:
21+
toolchain: ${{ inputs.toolchain }}
22+
target: ${{ inputs.target }}
23+
default: true
24+
components: ${{ inputs.components }}
25+
profile: minimal
26+
27+
- uses: Swatinem/[email protected]

.github/bors.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
block_labels = ["needs-decision"]
22
delete_merged_branches = true
3-
required_approvals = 1
4-
status = ["rust-embedded.cross", "shellcheck"]
3+
required_approvals = 0
4+
use_codeowners = false
5+
status = ["conclusion"]
56
timeout_sec = 21600

.github/workflows/changelog.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
on:
2+
pull_request:
3+
types: [labeled, unlabeled, opened, synchronize, reopened]
4+
5+
name: Changelog check
6+
7+
jobs:
8+
changelog:
9+
name: Changelog check
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout sources
13+
uses: actions/checkout@v2
14+
15+
- name: Changelog updated
16+
uses: Zomzog/[email protected]
17+
with:
18+
fileName: CHANGELOG.md
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)