70 lines
2.4 KiB
YAML
70 lines
2.4 KiB
YAML
name: Buildtest
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
IMAGE_FN: devimgs-centos-7-rust-flat
|
|
BUILDER_IMAGE: localhost/devimgs/centos-7-rust-flat:latest
|
|
PODMAN_STORAGE: ${{ gitea.workspace }}/.podman-storage
|
|
PODMAN_RUNROOT: ${{ gitea.workspace }}/.podman-runroot
|
|
steps:
|
|
- name: Install podman
|
|
run: |
|
|
echo $(which podman)
|
|
echo $(which zstd)
|
|
echo $(which curl)
|
|
sudo apt-get install --assume-yes podman
|
|
# sudo apt-get update
|
|
- name: Load build image
|
|
run: |
|
|
PODMAN="podman --storage-driver=vfs --root $PODMAN_STORAGE --runroot $PODMAN_RUNROOT"
|
|
PODMAN="podman"
|
|
echo PODMAN COMMAND [["$PODMAN"]]
|
|
$PODMAN info
|
|
curl -L -o "$IMAGE_FN.tgz" "https://gitea.psi.ch/api/packages/daqbuf/generic/$IMAGE_FN/0.1.0/$IMAGE_FN.tgz"
|
|
zstd -d <"$IMAGE_FN.tgz" >"$IMAGE_FN.tar"
|
|
$PODMAN import \
|
|
--change 'CMD ["/bin/sh"]' \
|
|
--change 'WORKDIR /data' \
|
|
--change 'ENV PATH=/root/.cargo/bin:/opt/rh/devtoolset-11/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' \
|
|
"$IMAGE_FN.tar" \
|
|
"$BUILDER_IMAGE"
|
|
$PODMAN image list
|
|
$PODMAN container list
|
|
- name: List again
|
|
run: |
|
|
ls -la
|
|
PODMAN="podman --storage-driver=vfs --root $PODMAN_STORAGE --runroot $PODMAN_RUNROOT"
|
|
PODMAN="podman"
|
|
echo PODMAN COMMAND [["$PODMAN"]]
|
|
$PODMAN image list
|
|
- name: List again
|
|
run: |
|
|
PODMAN="podman --storage-driver=vfs --root $PODMAN_STORAGE --runroot $PODMAN_RUNROOT"
|
|
PODMAN="podman"
|
|
echo PODMAN COMMAND [["$PODMAN"]]
|
|
PRUN="$PODMAN run --rm --network=none --user 0 --cgroups=disabled --sysctl net.ipv4.ping_group_range= centos-7-rust-flat:latest"
|
|
PRUN="$PODMAN run --rm centos-7-rust-flat:latest"
|
|
echo PRUN [["$PRUN"]]
|
|
$PRUN id
|
|
$PRUN pwd
|
|
$PRUN ls /data
|
|
$PRUN cc --version
|
|
$PRUN rustup --version
|
|
$PRUN cargo --version
|
|
$PRUN rustc --version
|
|
- name: Install node
|
|
run: dnf install --assumeyes nodejs
|
|
- name: Check out repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: src
|