Skip to content

Commit

Permalink
ci: simplify cross-compilation workflow
Browse files Browse the repository at this point in the history
- Remove redundant architecture-specific package installations
- Rely on Cross.toml pre-build hooks for dependencies
- Keep only pkg-config as common dependency
- Remove unnecessary libudev.pc location check

The cross-compilation setup is now properly separated between GitHub
Actions workflow and Cross.toml configuration.
  • Loading branch information
aljen committed Nov 30, 2024
1 parent 45ec19a commit c0edb8f
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install system dependencies
if: matrix.target == 'x86_64-unknown-linux-gnu'
- name: Install common dependencies
run: |
sudo apt-get update && \
sudo apt-get install -y libudev-dev && \
find /usr -name libudev.pc
sudo apt-get update
sudo apt-get install -y pkg-config
- name: Install cross
uses: taiki-e/install-action@cross

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -63,9 +64,6 @@ jobs:
restore-keys: |
${{ runner.os }}-cargo-${{ matrix.target }}-
- name: Install cross
uses: taiki-e/install-action@cross

- name: Install cargo-deb
run: cargo install cargo-deb

Expand Down Expand Up @@ -144,7 +142,7 @@ jobs:
mkdir -p pkg
cd pkg
mv ../modbus-relay.tar.gz .
cp /github/workspace/dist/arch/PKGBUILD .
cp /tmp/modbus-relay/dist/arch/PKGBUILD .
CARCH=${{ matrix.arch }} makepkg -s --noconfirm
- name: Upload artifacts
Expand Down

0 comments on commit c0edb8f

Please sign in to comment.