22222323 if : |
2424 steps.is_organization_member.outputs.result == 'false'
25-
25+
2626 build_macos :
2727 if : github.repository_owner == 'viamrobotics'
2828 runs-on : [self-hosted, ARM64, macOS]
@@ -37,17 +37,15 @@ jobs:
3737 steps :
3838 - uses : actions/checkout@v3
3939 - name : Setup rust toolchain
40- uses : actions-rs/ toolchain@v1
40+ uses : dtolnay/rust- toolchain@stable
4141 with :
4242 toolchain : stable
43- target : ${{ matrix.target }}
43+ targets : ${{ matrix.target }}
4444 - name : Setup build directory
4545 run : mkdir builds
4646 - name : Build
47- uses : actions-rs/cargo@v1
48- with :
49- command : build
50- args : --release --target=${{ matrix.target }}
47+ run : |
48+ cargo build --release --target=${{ matrix.target }}
5149 - name : Copy
5250 run : cp target/${{ matrix.target }}/release/libviam_rust_utils.dylib builds/libviam_rust_utils-${{ matrix.platform }}.dylib
5351 - name : Upload artifacts
@@ -60,39 +58,35 @@ jobs:
6058 if : github.repository_owner == 'viamrobotics'
6159 runs-on : [self-hosted, x64]
6260 container :
63- image : ghcr.io/viamrobotics/canon:amd64-cache
64- options : -v /var/run/docker.sock:/var/run/docker.sock -v ${{ github.workspace }}:/project -w /project
61+ image : ghcr.io/cross-rs/${{ matrix.image }}
6562 strategy :
6663 fail-fast : false
6764 matrix :
6865 include :
6966 - target : aarch64-unknown-linux-gnu
7067 platform : linux_aarch64
71- cross : true
68+ image : aarch64-unknown-linux-gnu:main-centos
7269 - target : x86_64-unknown-linux-gnu
7370 platform : linux_x86_64
74- cross : false
71+ image : x86_64-unknown-linux-gnu:main-centos
7572 - target : arm-unknown-linux-gnueabihf
7673 platform : linux_armv6l
77- cross : true
74+ image : arm-unknown-linux-gnueabihf:main
7875 steps :
7976 - uses : actions/checkout@v3
8077 - name : Setup rust toolchain
81- uses : actions-rs/toolchain@v1
82- with :
83- toolchain : stable
84- target : ${{ matrix.target }}
85- override : true
78+ shell : bash
79+ run : |
80+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
81+ source "$HOME/.cargo/env"
82+ rustup target add ${{ matrix.target }}
8683 - name : Setup build directory
8784 run : mkdir builds
8885 - name : Build
89- uses : actions-rs/cargo@v1
90- with :
91- command : build
92- args : --release --target=${{ matrix.target }}
93- use-cross : ${{ matrix.cross }}
94- env :
95- CROSS_CONTAINER_IN_CONTAINER : ${{ matrix.cross }}
86+ shell : bash
87+ run : |
88+ source "$HOME/.cargo/env"
89+ cargo build --release --target=${{ matrix.target }}
9690 - name : Copy
9791 run : cp target/${{ matrix.target }}/release/libviam_rust_utils.so builds/libviam_rust_utils-${{ matrix.platform }}.so
9892 - name : Upload artifacts
0 commit comments