Skip to content

Commit

Permalink
#98
Browse files Browse the repository at this point in the history
  • Loading branch information
adamyg committed Jan 18, 2025
1 parent f85f2a1 commit 7e6b86a
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ jobs:
run: |
./configure
cat acdefines.h
gmake release
gmake release unittest
#end
12 changes: 11 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
git submodule update --init --recursive
- name: MSVC setup
uses: ilammy/msvc-dev-cmd@v1
uses: ilammy/msvc-dev-cmd@v1.13.0
if: startsWith(matrix.config.name, 'Windows Latest MSVC')
with:
arch: x86
Expand Down Expand Up @@ -162,6 +162,16 @@ jobs:
.\win32\gmake-42 release contrib
.\win32\gmake-42 release
- name: Windows, unit-test
if: startsWith(matrix.config.name, 'Windows Latest')
shell: cmd
run: |
@if "${{ matrix.config.toolchain }}"=="mingw32" set PATH=c:\msys64\mingw32\bin;%PATH%
@if "${{ matrix.config.toolchain }}"=="mingw64" set PATH=c:\msys64\mingw64\bin;%PATH%
@if "${{ matrix.config.toolchain }}"=="owc20" call .\support\owc20setenv.bat C:\Watcom
@set PERL=c:/Strawberry/perl/bin/perl
.\win32\gmake-42 release unittest
- name: Ubuntu, generate
if: startsWith(matrix.config.name, 'Ubuntu Latest')
shell: bash
Expand Down
70 changes: 61 additions & 9 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
APP_NAME: 'gr'
MAINTAINER: 'https://github.com/adamyg'
HOMEPAGE: 'https://github.com/adamyg/grief'
DESC: 'GriefEdit -- console editor.'

jobs:
build:
name: ${{ matrix.config.name }}
Expand Down Expand Up @@ -60,22 +66,22 @@ jobs:
shell: bash
run: |
mkdir .snapshot
tar --exclude-vcs --exclude='./.snapshot' --exclude='./win32' --exclude='./contrib' --exclude='./support/*.bat' --exclude='./defunct' -cf .snapshot/source-snapshot.tar .
tar --exclude-vcs -cf .snapshot/contrib-snapshot.tar ./contrib
tar --exclude-vcs --exclude='./.snapshot' --exclude='./win32' --exclude='./contrib' --exclude='./support/*.bat' --exclude='./defunct' -cf .snapshot/source-snapshot.tar .
tar --exclude-vcs -cf .snapshot/contrib-snapshot.tar ./contrib
- name: Source Snapshot Publish
if: startsWith(matrix.config.name, 'Ubuntu Latest')
uses: actions/upload-artifact@v4
with:
name: source-snapshot
name: source-snapshot.tar
path: .snapshot/source-snapshot.tar
compression-level: 9

- name: Contrib Snapshot Publish
if: startsWith(matrix.config.name, 'Ubuntu Latest')
uses: actions/upload-artifact@v4
with:
name: contrib-snapshot
name: contrib-snapshot.tar
path: .snapshot/contrib-snapshot.tar
compression-level: 9

Expand Down Expand Up @@ -108,16 +114,19 @@ jobs:
if: startsWith(matrix.config.name, 'Ubuntu Latest')
shell: bash
run: |
sudo add-apt-repository universe
sudo apt-get install -y libncurses-dev
sudo apt-get install -y libncursesw5-dev
sudo apt-get install -y libenchant-2-dev
sudo apt-get install -y libaspell-dev
sudo apt-get install -y libhunspell-dev
sudo apt-get install -y libenca-dev
sudo apt-get install -y libguess-dev
sudo apt-get install -y libexplain-dev
sudo apt-get install -y libarchive-dev
## 24/10: removed
## legacy: sudo apt-get install -y libncursesw5-dev
## missing: sudo apt-get install -y libguess-dev
- name: MacOS, setup
if: startsWith(matrix.config.name, 'MacOS Latest')
shell: bash
Expand Down Expand Up @@ -153,18 +162,58 @@ jobs:
.\win32\gmake-42 release contrib
.\win32\gmake-42 release
- name: Windows, unit-test
if: startsWith(matrix.config.name, 'Windows Latest')
shell: cmd
run: |
@if "${{ matrix.config.toolchain }}"=="mingw32" set PATH=c:\msys64\mingw32\bin;%PATH%
@if "${{ matrix.config.toolchain }}"=="mingw64" set PATH=c:\msys64\mingw64\bin;%PATH%
@if "${{ matrix.config.toolchain }}"=="owc20" call .\support\owc20setenv.bat C:\Watcom
@set PERL=c:/Strawberry/perl/bin/perl
.\win32\gmake-42 release unittest
- name: Ubuntu, generate
if: startsWith(matrix.config.name, 'Ubuntu Latest')
shell: bash
run: |
chmod +x configure
./support/config_withncurses
./support/config_withncursesw
- name: Ubuntu, compile
if: startsWith(matrix.config.name, 'Ubuntu Latest')
shell: bash
run: |
make release
make release prepare_deb
echo "$(cat ./.PKGLABEL)" >> $GITHUB_ENV
- name: Ubuntu, unit-test
if: startsWith(matrix.config.name, 'Ubuntu Latest')
shell: bash
run: |
make release unittest
# https://github.com/marketplace/actions/build-deb-action
- name: Ubuntu, deb
id: deb
if: startsWith(matrix.config.name, 'Ubuntu Latest')
uses: jiro4989/[email protected]
with:
package: ${{ env.APP_NAME }}
package_root: .debpkg
maintainer: ${{ env.MAINTAINER }}
version: ${{ env.VERSION }}
arch: 'amd64'
depends: 'libhunspell-dev, libarchive13, libncurses6'
desc: '${{ env.DESC }}'
homepage: '${{ env.HOMEPAGE }}'

- name: Ubuntu, upload
if: startsWith(matrix.config.name, 'Ubuntu Latest')
uses: actions/upload-artifact@v4
with:
name: ${{ steps.deb.outputs.file_name }}
path: |
./${{ steps.deb.outputs.file_name }}
- name: MacOS, generate
if: startsWith(matrix.config.name, 'MacOS Latest')
Expand All @@ -191,4 +240,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: package-${{ matrix.config.package }}
path: ./bin.${{ matrix.config.toollabel }}/release/*
path: |
./bin.${{ matrix.config.toollabel }}/release/*
#end

0 comments on commit 7e6b86a

Please sign in to comment.