Skip to content

Self update

Self update #319

Workflow file for this run

name: ci build
on: [pull_request, workflow_dispatch]
jobs:
test:
runs-on: ${{ matrix.os }}
env:
IMAGE_NAME: mcr.microsoft.com/windows/nanoserver:ltsc2022-amd64
strategy:
matrix:
include:
# - os: ubuntu-latest
# container: 'ubuntu:22.04'
# artifact: 'ubuntu'
#
# - os: ubuntu-latest
# container: 'alpine:3.15.0'
# artifact: 'alpine'
- os: windows-latest
artifact: 'windows'
- os: windows-latest
artifact: 'nanoserver'
container: ${{ matrix.container }}
steps:
- name: Install Ubuntu packages
if: matrix.artifact == 'ubuntu'
run: |
apt update
apt install -y busybox dos2unix libarchive-tools python3 git
git config --global --add safe.directory '*'
- name: Install Alpine packages
if: matrix.artifact == 'alpine'
run: |
apk add --no-cache bash libarchive-tools python3 git
git config --global --add safe.directory '*'
- uses: actions/checkout@v3
with:
fetch-depth: 0 # need for self_count
- name: ci test-run (non windows)
if: matrix.os != 'windows-latest'
run: .tests/ci-test-run.sh
- name: ci test-run (windows)
if: matrix.artifact == 'windows'
shell: cmd
run: |
rm -f "C:\Strawberry\perl\bin\shasum.BAT"
call .tests\ci-test-run.bat
- name: pull (nanoserver) container ${{ env.IMAGE_NAME }}
if: matrix.artifact == 'nanoserver'
run: |
docker pull ${{ env.IMAGE_NAME }}
docker images ${{ env.IMAGE_NAME }}
- name: ci test-run (nanoserver)
if: matrix.artifact == 'nanoserver'
run: |
cd "${{ github.workspace }}\.tests"
curl --location "https://github.com/hemnstill/StandaloneTools/releases/download/python-3.12.1/build-msvc.tar.gz" --output "python.tar.gz"
tar -xf "python.tar.gz" ./Scripts
echo f | xcopy /Y /Q /R "${{ github.workspace }}\.tests\python.exe" "${{ github.workspace }}\.tests\python3.exe"
docker container run --rm -v ${{ github.workspace }}:C:\app -w C:\app ${{ env.IMAGE_NAME }} C:\app\.tests\ci-test-run.bat
test-create:
needs: test
runs-on: ${{ matrix.os }}
name: Run test-create
strategy:
matrix:
include:
- os: ubuntu-latest
artifact: 'ubuntu'
- os: windows-latest
artifact: 'windows'
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v3
- name: External test-run (non windows)
if: matrix.os != 'windows-latest'
run: .tests/test-run.sh -- testExternalCreate
- name: External test-run (windows)
if: matrix.os == 'windows-latest'
shell: cmd
run: call .tests\test-run.bat -- testExternalCreate