ci: add Linux jobs to build and release workflows
This commit is contained in:
@@ -70,3 +70,58 @@ jobs:
|
|||||||
path: dist/**
|
path: dist/**
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
|
build-linux:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
config: [x86-ansi, x86-unicode, x64-unicode]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
|
||||||
|
- name: Install MinGW toolchain
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y \
|
||||||
|
make \
|
||||||
|
binutils-mingw-w64-i686 \
|
||||||
|
binutils-mingw-w64-x86-64 \
|
||||||
|
g++-mingw-w64-i686 \
|
||||||
|
g++-mingw-w64-x86-64
|
||||||
|
|
||||||
|
- name: Read VERSION
|
||||||
|
id: version_linux
|
||||||
|
run: |
|
||||||
|
v="$(tr -d '\r\n' < VERSION)"
|
||||||
|
echo "version=$v" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Build ${{ matrix.config }} on Linux
|
||||||
|
run: python build_plugin.py --host linux --configs ${{ matrix.config }} --verbose
|
||||||
|
|
||||||
|
- name: Collect DLL
|
||||||
|
run: |
|
||||||
|
case "${{ matrix.config }}" in
|
||||||
|
x86-ansi) dir="x86-ansi" ;;
|
||||||
|
x86-unicode) dir="x86-unicode" ;;
|
||||||
|
x64-unicode) dir="amd64-unicode" ;;
|
||||||
|
esac
|
||||||
|
dst="dist/${{ matrix.config }}"
|
||||||
|
mkdir -p "$dst"
|
||||||
|
cp "plugins/$dir/nsis7z.dll" "$dst/"
|
||||||
|
|
||||||
|
- name: Upload DLL
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ github.event.repository.name }}-${{ steps.version_linux.outputs.version }}-${{ matrix.config }}-linux
|
||||||
|
path: dist/**
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 30
|
||||||
|
|||||||
@@ -68,8 +68,53 @@ jobs:
|
|||||||
name: pkg-${{ matrix.config }}
|
name: pkg-${{ matrix.config }}
|
||||||
path: '*.zip'
|
path: '*.zip'
|
||||||
|
|
||||||
|
build-linux:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: true
|
||||||
|
matrix:
|
||||||
|
config: [x86-ansi, x86-unicode, x64-unicode]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
|
||||||
|
- name: Install MinGW toolchain
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y \
|
||||||
|
make \
|
||||||
|
binutils-mingw-w64-i686 \
|
||||||
|
binutils-mingw-w64-x86-64 \
|
||||||
|
g++-mingw-w64-i686 \
|
||||||
|
g++-mingw-w64-x86-64
|
||||||
|
|
||||||
|
- name: Build ${{ matrix.config }} on Linux
|
||||||
|
run: python build_plugin.py --host linux --configs ${{ matrix.config }}
|
||||||
|
|
||||||
|
- name: Collect DLL
|
||||||
|
run: |
|
||||||
|
case "${{ matrix.config }}" in
|
||||||
|
x86-ansi) dir="x86-ansi" ;;
|
||||||
|
x86-unicode) dir="x86-unicode" ;;
|
||||||
|
x64-unicode) dir="amd64-unicode" ;;
|
||||||
|
esac
|
||||||
|
dst="dist/${{ matrix.config }}"
|
||||||
|
mkdir -p "$dst"
|
||||||
|
cp "plugins/$dir/nsis7z.dll" "$dst/"
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: linux-build-${{ matrix.config }}
|
||||||
|
path: dist/**
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
needs: build
|
needs: [build, build-linux]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user