Skip to content

Commit

Permalink
CI separated builds
Browse files Browse the repository at this point in the history
  • Loading branch information
adamyg committed Sep 13, 2024
1 parent 468de81 commit d83a068
Show file tree
Hide file tree
Showing 5 changed files with 394 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/bsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
#

on: [push, pull_request]
name: FreeOpenNetBSD
name: "FreeOpenNetBSD builds"

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.sha || '' }}
cancel-in-progress: true
Expand Down
188 changes: 188 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
name: "Linux builds"
on: [push]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
# - {
# name: "Windows Latest MSVC",
# os: windows-latest,
# toolchain: vc2022,
# toollabel: vs170,
# package: win32-vs22
# }
# - {
# name: "Windows Latest MinGW",
# os: windows-latest,
# toolchain: mingw64,
# toollabel: mingw64,
# package: win32-w64
# }
# - {
# name: "Windows Latest OWC",
# os: windows-latest,
# toolchain: owc20,
# toollabel: owc20,
# package: win32-owc
# }
- {
name: "Ubuntu Latest GCC",
os: ubuntu-latest,
toolchain: gcc,
toollabel: gcc,
package: ubuntu-gcc
}
# - {
# name: "MacOS Latest GCC",
# os: macos-latest,
# toolchain: gcc,
# toollabel: gcc,
# package: macos-gcc
# }

steps:

- name: Checkout repository
uses: actions/checkout@v4

- name: Snapshot Source
if: startsWith(matrix.config.name, 'Ubuntu Latest')
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
- name: Source Snapshot Publish
if: startsWith(matrix.config.name, 'Ubuntu Latest')
uses: actions/upload-artifact@v4
with:
name: source-snapshot
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
path: .snapshot/contrib-snapshot.tar
compression-level: 9

- name: Checkout submodules
run: |
git submodule update --init --recursive
- name: MSVC setup
uses: ilammy/msvc-dev-cmd@v1
if: startsWith(matrix.config.name, 'Windows Latest MSVC')
with:
arch: x86

- name: MinGW64 setup
if: startsWith(matrix.config.name, 'Windows Latest MinGW')
shell: cmd
run: |
c:\msys64\usr\bin\pacman --noconfirm -S base-devel
c:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-gcc
c:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-i686-gcc
- name: OpenWatcom setup
uses: open-watcom/setup-watcom@v0
if: startsWith(matrix.config.name, 'Windows Latest OWC')
with:
version: "2.0"
location: "C:\\Watcom"

- name: Ubuntu, setup
if: startsWith(matrix.config.name, 'Ubuntu Latest')
shell: bash
run: |
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
- name: MacOS, setup
if: startsWith(matrix.config.name, 'MacOS Latest')
shell: bash
run: |
brew install pkg-config
brew install ncurses
brew link ncurses
brew install enchant
brew install libspelling
brew install hunspell
brew install libarchive
brew install wget
- name: Windows, generate
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
@if NOT "${{ matrix.config.toolchain }}"=="mingw64" c:\msys64\usr\bin\pacman --noconfirm -S bison
@set PERL=c:/Strawberry/perl/bin/perl
c:/Strawberry/perl/bin/perl makelib.pl --perlpath=c:/Strawberry/perl/bin --busybox=./win32/busybox --wget=./win32/wget --bison=c:/msys64/usr/bin/bison --flex=./bin.${{ matrix.config.toollabel }}/release/flex "${{ matrix.config.toolchain }}"
- name: Windows, compile
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 contrib
.\win32\gmake-42 release
- name: Ubuntu, generate
if: startsWith(matrix.config.name, 'Ubuntu Latest')
shell: bash
run: |
chmod +x configure
./support/config_withncurses
- name: Ubuntu, compile
if: startsWith(matrix.config.name, 'Ubuntu Latest')
shell: bash
run: |
make release
- name: MacOS, generate
if: startsWith(matrix.config.name, 'MacOS Latest')
shell: bash
run: |
export CPATH=$(brew --prefix libarchive)/include:/usr/local/include:$CPATH
export CPPPATH=$(brew --prefix libarchive)/include:/usr/local/include:$CPATH
export LIBRARY_PATH=$(brew --prefix libarchive)/lib:/usr/local/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=$(brew --prefix libarchive)/lib:/usr/local/lib:$LD_LIBRARY_PATH
chmod +x configure
./support/config_withncurses
- name: MacOS, compile
if: startsWith(matrix.config.name, 'MacOS Latest')
shell: bash
run: |
export CPATH=$(brew --prefix libarchive)/include:/usr/local/include:$CPATH
export CPPPATH=$(brew --prefix libarchive)/include:/usr/local/include:$CPATH
export LIBRARY_PATH=$(brew --prefix libarchive)/lib:/usr/local/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=$(brew --prefix libarchive)/lib:/usr/local/lib:$LD_LIBRARY_PATH
make release
- name: Package
uses: actions/upload-artifact@v4
with:
name: package-${{ matrix.config.package }}
path: ./bin.${{ matrix.config.toollabel }}/release/*
188 changes: 188 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
name: "MacOS builds"
on: [push]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
# - {
# name: "Windows Latest MSVC",
# os: windows-latest,
# toolchain: vc2022,
# toollabel: vs170,
# package: win32-vs22
# }
# - {
# name: "Windows Latest MinGW",
# os: windows-latest,
# toolchain: mingw64,
# toollabel: mingw64,
# package: win32-w64
# }
# - {
# name: "Windows Latest OWC",
# os: windows-latest,
# toolchain: owc20,
# toollabel: owc20,
# package: win32-owc
# }
# - {
# name: "Ubuntu Latest GCC",
# os: ubuntu-latest,
# toolchain: gcc,
# toollabel: gcc,
# package: ubuntu-gcc
# }
- {
name: "MacOS Latest GCC",
os: macos-latest,
toolchain: gcc,
toollabel: gcc,
package: macos-gcc
}

steps:

- name: Checkout repository
uses: actions/checkout@v4

- name: Snapshot Source
if: startsWith(matrix.config.name, 'Ubuntu Latest')
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
- name: Source Snapshot Publish
if: startsWith(matrix.config.name, 'Ubuntu Latest')
uses: actions/upload-artifact@v4
with:
name: source-snapshot
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
path: .snapshot/contrib-snapshot.tar
compression-level: 9

- name: Checkout submodules
run: |
git submodule update --init --recursive
- name: MSVC setup
uses: ilammy/msvc-dev-cmd@v1
if: startsWith(matrix.config.name, 'Windows Latest MSVC')
with:
arch: x86

- name: MinGW64 setup
if: startsWith(matrix.config.name, 'Windows Latest MinGW')
shell: cmd
run: |
c:\msys64\usr\bin\pacman --noconfirm -S base-devel
c:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-gcc
c:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-i686-gcc
- name: OpenWatcom setup
uses: open-watcom/setup-watcom@v0
if: startsWith(matrix.config.name, 'Windows Latest OWC')
with:
version: "2.0"
location: "C:\\Watcom"

- name: Ubuntu, setup
if: startsWith(matrix.config.name, 'Ubuntu Latest')
shell: bash
run: |
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
- name: MacOS, setup
if: startsWith(matrix.config.name, 'MacOS Latest')
shell: bash
run: |
brew install pkg-config
brew install ncurses
brew link ncurses
brew install enchant
brew install libspelling
brew install hunspell
brew install libarchive
brew install wget
- name: Windows, generate
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
@if NOT "${{ matrix.config.toolchain }}"=="mingw64" c:\msys64\usr\bin\pacman --noconfirm -S bison
@set PERL=c:/Strawberry/perl/bin/perl
c:/Strawberry/perl/bin/perl makelib.pl --perlpath=c:/Strawberry/perl/bin --busybox=./win32/busybox --wget=./win32/wget --bison=c:/msys64/usr/bin/bison --flex=./bin.${{ matrix.config.toollabel }}/release/flex "${{ matrix.config.toolchain }}"
- name: Windows, compile
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 contrib
.\win32\gmake-42 release
- name: Ubuntu, generate
if: startsWith(matrix.config.name, 'Ubuntu Latest')
shell: bash
run: |
chmod +x configure
./support/config_withncurses
- name: Ubuntu, compile
if: startsWith(matrix.config.name, 'Ubuntu Latest')
shell: bash
run: |
make release
- name: MacOS, generate
if: startsWith(matrix.config.name, 'MacOS Latest')
shell: bash
run: |
export CPATH=$(brew --prefix libarchive)/include:/usr/local/include:$CPATH
export CPPPATH=$(brew --prefix libarchive)/include:/usr/local/include:$CPATH
export LIBRARY_PATH=$(brew --prefix libarchive)/lib:/usr/local/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=$(brew --prefix libarchive)/lib:/usr/local/lib:$LD_LIBRARY_PATH
chmod +x configure
./support/config_withncurses
- name: MacOS, compile
if: startsWith(matrix.config.name, 'MacOS Latest')
shell: bash
run: |
export CPATH=$(brew --prefix libarchive)/include:/usr/local/include:$CPATH
export CPPPATH=$(brew --prefix libarchive)/include:/usr/local/include:$CPATH
export LIBRARY_PATH=$(brew --prefix libarchive)/lib:/usr/local/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=$(brew --prefix libarchive)/lib:/usr/local/lib:$LD_LIBRARY_PATH
make release
- name: Package
uses: actions/upload-artifact@v4
with:
name: package-${{ matrix.config.package }}
path: ./bin.${{ matrix.config.toollabel }}/release/*
4 changes: 1 addition & 3 deletions .github/workflows/solaris.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: "Solaris build"

name: "Solaris builds"
on: [push]

jobs:
build:
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit d83a068

Please sign in to comment.