Skip to content

Add python3

Add python3 #115

Workflow file for this run

# Build encoding converters and run tests
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: "./EncConverters 2019.sln"
jobs:
build-windows:
runs-on: windows-2019 # [windows-latest] # VS 2022 doesn't automatically include the proper .net framework
strategy:
# Keep building other jobs even if another fails, to show what _is_ still working.
fail-fast: false
matrix:
build_configuration: ["Debug", "Release"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Add MSBuild to PATH
uses: microsoft/[email protected]
- name: Fetch nuget dependecies
run: nuget restore "${{env.SOLUTION_FILE_PATH}}"
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:Configuration=${{matrix.build_configuration}} "${{env.SOLUTION_FILE_PATH}}"
- name: List Files in Repository
run: dir /s
shell: cmd
- name: Create NuGet Package
run: nuget pack ./Package.${{matrix.build_configuration}}.nuspec -OutputDirectory ./output/${{matrix.build_configuration}}
- name: Upload NuGet Package as Artifact
uses: actions/upload-artifact@v2
with:
name: ${{matrix.build_configuration}}-nuget-package
path: ./output/${{matrix.build_configuration}}/*.nupkg
# TODO Run tests
#- name: Test
# run: output/Win32/${{matrix.build_configuration}}/RunTests.exe
build-linux:
runs-on: [ubuntu-20.04]
strategy:
matrix:
build_configuration: ["Debug", "Release"]
steps:
- name: Add repo packages.sil.org
run: |
(wget -O- https://packages.sil.org/keys/pso-keyring-2016.gpg | sudo tee /etc/apt/trusted.gpg.d/pso-keyring-2016.gpg)&>/dev/null
(. /etc/os-release && sudo tee /etc/apt/sources.list.d/packages-sil-org.list>/dev/null <<< "deb http://packages.sil.org/$ID $VERSION_CODENAME main")
sudo apt-get update
- name: Install dependencies
run: sudo apt-get install --assume-yes automake g++ python2-dev python2 libicu-dev mono5-sil icu-dev-fw libteckit-dev
- name: Checkout
uses: actions/checkout@v2
- name: List Files in Repository
run: ls -R
- name: Restore NuGet Packages
run: nuget restore "${{env.SOLUTION_FILE_PATH}}"
- name: Autogen
run: . environ && ./autogen.sh
- name: Build
run: . environ && make
- name: Test
if: matrix.build_configuration == 'Debug'
run: |
. environ
export EC_COMMON_APPLICATION_DATA_PATH="$(pwd)/ec-common"
export MONO_REGISTRY_PATH="${EC_COMMON_APPLICATION_DATA_PATH}/registry"
cp -a src/RunTests/bin/x64/${{matrix.build_configuration}}/RunTests.exe output/x64/${{matrix.build_configuration}}/
# Note that currently, many tests fail and it doesn't fail this build step.
mono output/x64/${{matrix.build_configuration}}/RunTests.exe