Skip to content

Commit

Permalink
Try building ARM64 Linux package on macOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
dumol committed Aug 1, 2024
1 parent a348029 commit 3bc5bef
Showing 1 changed file with 69 additions and 3 deletions.
72 changes: 69 additions & 3 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,76 @@ env:
USER: chevah
CHEVAH_CONTAINER: yes

# Using a job name that doesn't contain the OS name, to minimize the risk of
# confusion with the OS names of the containers, which are the relevant ones.
jobs:
latest:

arm64:
runs-on: macos-latest
container: amazonlinux-2
strategy:
fail-fast: false

timeout-minutes: 30
steps:
- name: Prepare OS
run: yum -y install git-core gcc make m4 patch tar unzip perl perl-Test-Simple xz gcc-c++ dejagnu

# On a Docker container, everything runs as root by default.
- name: Chevah user setup
run: |
useradd -g adm -s /bin/bash -m chevah
# Don't just add to the file, reset it, as some default options might
# be detrimental to our testing, e.g. CentOS 5's "requiretty" option.
echo '%adm ALL=NOPASSWD: ALL' > /etc/sudoers
# GHA's checkout action doesn't work on exotic platforms. This fails on opening a new PR.
- name: Clone sources independently
run: |
cd /home/chevah/
git init $CHEVAH_REPO
cd $CHEVAH_REPO
# Cleanup the repo.
git rev-parse --symbolic-full-name --verify --quiet HEAD || true
git rev-parse --symbolic-full-name --branches || true
git remote remove origin || true
# Update repo token.
git remote add origin https://github.com/chevah/$CHEVAH_REPO
git fetch --no-tags --prune origin
# Prepare the code.
git clean -f
git reset --hard ${{ github.event.after }}
git log -1 --format='%H'
- name: Detect OS and build Python
run: |
cd /home/chevah/$CHEVAH_REPO
./brink.sh detect_os
./chevah_build build
- name: Own tests
run: |
cd /home/chevah/$CHEVAH_REPO
./chevah_build test
# Compat tests must run as regular user with sudo rights.
- name: Compat tests
run: |
chown -R chevah /home/chevah/$CHEVAH_REPO
cd /home/chevah/$CHEVAH_REPO
true su chevah -c "./chevah_build compat"
# Using `~/` is problematic under Docker, use `/root/`.
- name: Upload testing package
run: |
mkdir -pv /root/.ssh/
cd /home/chevah/$CHEVAH_REPO
touch priv_key
chmod 600 priv_key
echo "${{ secrets.SFTPPLUS_BIN_PRIV_KEY }}" > priv_key
echo "${{ secrets.SFTPPLUS_BIN_HOST_KEY }}" > /root/.ssh/known_hosts
./publish_dist.sh
rm priv_key
x64:
runs-on: ubuntu-latest
container: ${{ matrix.container }}
strategy:
Expand Down

0 comments on commit 3bc5bef

Please sign in to comment.