File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed
Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 1414 RUBYOPT : " --disable=gems"
1515 cargo_build_profile : thin
1616 ghcr_repo : ' ghcr.io/2cd/pkgs'
17+ cargo_target : ' x86_64-unknown-linux-musl'
1718
1819jobs :
1920 build :
6869 - name : cargo build
6970 run : |
7071 pp `cargo -Vv`
71- %w[cargo b --profile ${{env.cargo_build_profile}}]
72+ %w[rustup target add ${{env.cargo_target}}].then(&run)
73+ apt = %w[sudo apt-get]
74+ apt.dup.push('update').then(&run)
75+ apt.concat(%w[install -y musl-tools]).then(&run)
76+ {
77+ cargo: nil,
78+ build: nil,
79+ profile: ${{env.cargo_build_profile}},
80+ target: ${{env.cargo_target}},
81+ }
82+ .then(&hash_to_args)
7283 .then(&run)
7384
7485 - uses : actions/checkout@v4
96107 docker_file: 'pkgs/ci/cross.dockerfile',
97108 pkg_name: 'cross',
98109 suffix: '',
99- # target: 'x86_64-unknown-linux-gnu',
100- target: '',
110+ target: '${{env.cargo_target}}',
101111 }
102112
103113 [cfg, cfg.merge({pkg_name: 'cross-util'})].each do |x|
Original file line number Diff line number Diff line change 22
331 . cross-rs
44
5- ``` sh
6- docker run -v $PWD :/host --rm ghcr.io/2cd/pkgs:cross-x64 cp -a . /host
5+ github actions:
76
8- ./cross
7+ ``` yaml
8+ - name : fetch cross-rs bin
9+ run : docker run -v /usr/local/bin:/host --rm ghcr.io/2cd/pkgs:cross-x64 cp cross /host
10+ - name : run cross
11+ run : cross build --release --target riscv64gc-unknown-linux-musl
912` ` `
You can’t perform that action at this time.
0 commit comments