Skip to content

Merge pull request #171 from swetar-mecha/settings-app/ui-improvements #73

Merge pull request #171 from swetar-mecha/settings-app/ui-improvements

Merge pull request #171 from swetar-mecha/settings-app/ui-improvements #73

name: Pam - Build aarch64
on:
push:
branches:
- main
- dev
- dev-arm64-build
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTUP_MAX_RETRIES: 10
MACOSX_DEPLOYMENT_TARGET: 10.7
CARGO_NET_GIT_FETCH_WITH_CLI: true
jobs:
build:
name: ${{ matrix.name }}
strategy:
fail-fast: true
matrix:
include:
- name: PAM module
package: pam-mechanix
lib: libpam_mechanix.so
bin: "{mechanix-chkpwd,mechanix-setpwd}"
conf: mechanix-shell
artifact: pam-mechanix-aarch64-unknown-linux-gnu.tar.gz
path: pam
runs-on: ubicloud-standard-2-arm
continue-on-error: false
steps:
- name: Setup | Checkout
uses: actions/checkout@v4
- name: Install Rust 1.75.0
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
rustup default 1.75.0
- name: Install cargo-deb
run: cargo install cargo-deb
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: |
sudo apt install \
libdbus-1-dev \
libpam0g-dev \
libclang-dev
- name: Set up Git SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY_GIT }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Build [${{ matrix.package }}]
run: |
cd ${{ matrix.path }}
cargo --config net.git-fetch-with-cli=true fetch
cargo build --release
ls -la
- name: Package deb [${{ matrix.package }}]
run: |
cd ${{ matrix.path }}
cargo deb --no-build
ls -la
- name: Prepare artifacts [${{ matrix.package }}]
run: |
mkdir build
cp ${{ matrix.path }}/target/release/${{ matrix.lib }} ./build
cp ${{ matrix.path }}/target/release/${{ matrix.bin }} ./build
cp ${{ matrix.path }}/etc/pam.d/${{ matrix.conf }} ./build
cp ${{ matrix.path }}/target/debian/*.deb ./build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ./build/*