-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from nevkontakte/master
Overhaul FWL build process using GitHub actions automation
- Loading branch information
Showing
36 changed files
with
301 additions
and
2,578 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: CMake | ||
|
||
on: | ||
push: | ||
branches: [ "*" ] | ||
pull_request: | ||
branches: [ "*" ] | ||
release: | ||
type: [created, edited] | ||
|
||
env: | ||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | ||
BUILD_TYPE: RelWithDebInfo | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- windows-latest | ||
- macos-latest | ||
|
||
runs-on: ${{matrix.os}} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: "Windows: Configure environment" | ||
if: runner.os == 'Windows' | ||
shell: bash | ||
run: | | ||
# Select MinGW toolchain instead of the default MSVC. | ||
echo "CMAKE_GENERATOR=MinGW Makefiles" >> $GITHUB_ENV | ||
- name: "Linux: Install dependency libraries" | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y --no-install-recommends freeglut3-dev libudev-dev libopenal-dev | ||
- name: Configure CMake | ||
working-directory: ${{github.workspace}}/src | ||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | ||
|
||
- name: Build | ||
working-directory: ${{github.workspace}}/src | ||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | ||
|
||
- name: Test | ||
working-directory: ${{github.workspace}}/build | ||
run: ctest -C ${{env.BUILD_TYPE}} | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: binaries | ||
path: ${{github.workspace}}/build/*.xpl | ||
if-no-files-found: error | ||
|
||
package: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: binaries | ||
path: FlyWithLua/64 | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: FlyWithLua_plugin | ||
path: | | ||
${{github.workspace}}/FlyWithLua* | ||
if-no-files-found: error | ||
|
||
- name: Create plugin archive | ||
if: github.event_name == 'release' | ||
run: zip -r FlyWithLua_all_platforms.zip FlyWithLua/ | ||
|
||
- name: Upload binaries to release | ||
if: github.event_name == 'release' | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: FlyWithLua_all_platforms.zip | ||
tag: ${{ github.ref }} | ||
overwrite: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.xpl |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.