Skip to content

Commit

Permalink
Added GitHub Actions job for testing FreeBSD.
Browse files Browse the repository at this point in the history
  • Loading branch information
orbitalquark committed Oct 5, 2024
1 parent a66ceaa commit 182de86
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,80 @@ jobs:
if: success() || failure()
run: cat test.log

test-bsd:
if: ${{ ! inputs.no_tests }}
runs-on: ubuntu-latest
env:
TEXTADEPT_HOME: ${{ github.workspace }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout textadept-build dependencies
uses: actions/checkout@v4
with:
repository: orbitalquark/textadept-build
path: textadept-build

- name: Install dependencies
uses: cross-platform-actions/[email protected]
with:
operating_system: freebsd
version: '14.1'
shell: bash
environment_variables: TEXTADEPT_HOME
sync_files: false
shutdown_vm: false
run: sudo pkg install -y cmake ninja qt5 ncurses

- name: Build
uses: cross-platform-actions/[email protected]
with:
operating_system: freebsd
version: '14.1'
shell: bash
environment_variables: TEXTADEPT_HOME
sync_files: runner-to-vm
shutdown_vm: false
run: |
# Move cached dependencies into build/_deps.
mkdir -p build/_deps && mv textadept-build/* build/_deps && rm -r textadept-build
# Build.
if [[ ${{ github.event_name }} != schedule ]]; then
if [[ "${{ github.event.inputs.nightly }}" = true ]]; then nightly="-D NIGHTLY=1"; fi
else
nightly="-D NIGHTLY=1"
fi
cmake -S . -B build ${nightly} -G Ninja
cmake --build build
# Install lexers.
cp -r build/_deps/scintillua-src/lexers .
- name: Test
uses: cross-platform-actions/[email protected]
with:
operating_system: freebsd
version: '14.1'
shell: bash
environment_variables: TEXTADEPT_HOME
sync_files: false
shutdown_vm: false
run: build/textadept-curses -t
timeout-minutes: 1

- name: Read test output
if: success() || failure()
uses: cross-platform-actions/[email protected]
with:
operating_system: freebsd
version: '14.1'
shell: bash
environment_variables: TEXTADEPT_HOME
sync_files: false
run: cat test.log

coverage:
if: ${{ ! inputs.no_coverage }}
needs: modules
Expand Down
1 change: 1 addition & 0 deletions core/init_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,4 @@ test('timeout should repeatedly call a function as long as it returns true', fun
test.assert(duration > expected_duration, 'should have waited %fs, but waited only %fs)',
expected_duration, duration)
end)
if BSD then skip('luasocket was not built for this platform') end

0 comments on commit 182de86

Please sign in to comment.