Skip to content

Merge pull request #1041 from IceBreeze/exceptions #1105

Merge pull request #1041 from IceBreeze/exceptions

Merge pull request #1041 from IceBreeze/exceptions #1105

on:
push:
branches:
- dev
- test-builds
- actions-testing
name: Continuous Delivery
jobs:
buildDockerARM:
name: Build Docker Images (ARM)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: actions/cache@v4
with:
path: /tmp/buildxcache
key: ${{ runner.os }}-docker-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-docker-buildx-
- name: Build ARMv6/ARMv7 images
run: |
apt-get update && apt-get upgrade
docker buildx build \
--platform linux/arm/v6,linux/arm/v7 \
--output "type=image,push=false" \
--tag difegue/lanraragi:nightly \
--cache-from "type=local,src=/tmp/buildxcache" \
--cache-to "type=local,dest=/tmp/buildxcache" \
--file ./tools/build/docker/Dockerfile .
buildNightlyDocker:
name: Bundle and Push Docker Image
needs: buildDockerARM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: actions/cache@v4
with:
path: /tmp/buildxcache
key: ${{ runner.os }}-docker-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-docker-buildx-
- name: Docker Login
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: |
echo "${DOCKER_PASSWORD}" | docker login -u ${DOCKER_USERNAME} --password-stdin
- name: Build/Push Nightly Docker
run: |
docker buildx build \
--platform linux/386,linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7 \
--output "type=image,push=true" \
--tag difegue/lanraragi:nightly \
--cache-from "type=local,src=/tmp/buildxcache" \
--cache-to "type=local,dest=/tmp/buildxcache" \
--file ./tools/build/docker/Dockerfile .
exportDockerRootFS:
name: Build and export Docker rootfs for Windows build (WSL2)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Docker Build and export
run: |
docker build -t difegue/lanraragi -f ./tools/build/docker/Dockerfile .
docker create --name rootfs difegue/lanraragi
docker export --output=package.tar rootfs
- name: Upload rootfs
uses: actions/upload-artifact@v4
with:
name: package
path: package.tar
exportDockerRootFSLegacy:
name: Build and export Docker rootfs for Windows build (WSL1)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Docker Build and export
run: |
docker build -t difegue/lanraragi -f ./tools/build/docker/Dockerfile-legacy --build-arg INSTALL_PARAMETER=-w .
docker create --name rootfs difegue/lanraragi
docker export --output=package-legacy.tar rootfs
- name: Upload rootfs
uses: actions/upload-artifact@v4
with:
name: package-legacy
path: package-legacy.tar
buildNightlyWSL:
name: Build Nightly Windows Packages
needs: exportDockerRootFS
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- name: Download package
uses: actions/download-artifact@v4
with:
name: package
- name: Download package
uses: actions/download-artifact@v4
with:
name: package-legacy
- name: Display structure of downloaded files
run: ls -R
- name: Build MSI Installer
shell: powershell
run: |
[array]$installPath = &"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -property installationpath
# Get first line of installPath in case we have multiple VS installs
Import-Module (Join-Path $installPath[0] "Common7\Tools\Microsoft.VisualStudio.DevShell.dll")
# Import the VS shell module
Enter-VsDevShell -VsInstallPath $installPath[0] -SkipAutomaticLocation
$ErrorActionPreference = 'Continue'
git submodule init
git submodule update
choco uninstall wixtoolset
choco install wixtoolset --version 3.14.0 --allow-downgrade --force
choco install nuget.commandline
./tools/build/windows/build.ps1
- name: Upload Installer
uses: actions/upload-artifact@v4
with:
name: LANraragi.msi
path: ./tools/build/windows/Karen/LRR_WSL2.msi
if-no-files-found: error
- name: Upload Installer
uses: actions/upload-artifact@v4
with:
name: LANraragi_legacy.msi
path: ./tools/build/windows/Karen/LRR_WSL1.msi
if-no-files-found: error