Skip to content

[Win] Use correct type for file size limit #3616

[Win] Use correct type for file size limit

[Win] Use correct type for file size limit #3616

Workflow file for this run

name: Ubuntu CI (push and/or release)
on:
release:
types: [created]
push:
branches:
- develop
- feature/*
- features/*
- fix/*
- issue-*
- release/*
- doc/*
env:
GITHUB_TOKEN: ${{ github.token }}
IS_RELEASE: ${{ github.event_name == 'release' && github.event.action == 'created' }}
IS_PUSH: ${{ github.event_name == 'push' }}
jobs:
build:
name: Build
env:
ORTOOLS_DIR: ${{ github.workspace }}/or-tools
outputs:
os: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
os: [ubuntu-20.04]
test-platform: [ubuntu-20.04]
steps:
- uses: actions/checkout@v3
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ matrix.os }}
- name: Install libraries
run: |
sudo apt-get update
sudo apt-get install uuid-dev libwxgtk3.0-gtk3-dev
sudo apt-get install libboost-test-dev
- name: Read antares-deps version
id: antares-deps-version
uses: notiz-dev/github-action-json-property@release
with:
path: 'antares-deps-version.json'
prop_path: 'antares_deps_version'
- name: Config OR-Tools URL
run: |
echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.5-rte2.0/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV
- name: Download pre-compiled librairies
uses: ./.github/workflows/download-extract-precompiled-libraries-tgz
with:
antares-deps-version: ${{steps.antares-deps-version.outputs.prop}}
os: ${{matrix.os}}
ortools-url: ${{env.ORTOOLS_URL}}
ortools-dir: ${{env.ORTOOLS_DIR}}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip3 install -r src/tests/examples/requirements.txt
- name: Init submodule
run: |
git submodule update --init src/antares-deps
git submodule update --init src/tests/resources/Antares_Simulator_Tests
- name: Configure push
run: |
cmake -B _build -S src \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DDEPS_INSTALL_DIR=${{github.workspace}}/rte-antares-deps-Release \
-DCMAKE_BUILD_TYPE=release \
-DBUILD_TESTING=ON \
-DBUILD_not_system=OFF \
-DCMAKE_PREFIX_PATH=${{ env.ORTOOLS_DIR }}/install \
- name: Build
run: |
cmake --build _build --config release -j2
- name: Run unfeasibility-related tests
if: ${{ env.IS_PUSH == 'true' }}
run: |
cd _build
ctest -C Release --output-on-failure -R unfeasible
- name: Run unit and end-to-end tests
if: ${{ env.IS_PUSH == 'true' }}
run: |
cd _build
ctest -C ${{ matrix.buildtype }} --output-on-failure -L "unit|end-to-end"
- name: Run kirchhoff constraints tests
shell: bash
run: |
tar xvf src/tests/kirchhoff-cbuilder/reference.tar.gz -C src/tests/kirchhoff-cbuilder/
cd _build
ctest -C Release --output-on-failure -R kirchhoff
- name: Upload logs for failed tests
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: test-log
path: ${{ github.workspace }}/_build/Testing/Temporary/LastTest.log
# simtest
- name: Read simtest version
id: simtest-version
uses: notiz-dev/github-action-json-property@release
with:
path: 'simtest.json'
prop_path: 'version'
- name: Run tests about infinity on BCs RHS
if: ${{ env.IS_PUSH == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: valid-v830
os: ${{ matrix.test-platform }}
- name: Run short-tests
if: ${{ env.IS_PUSH == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: short-tests
os: ${{ matrix.test-platform }}
- name: Run mps tests
if: ${{ env.IS_PUSH == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: valid-mps
os: ${{ matrix.test-platform }}
- name: Run tests for adequacy patch (CSR)
if: ${{ env.IS_PUSH == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: adequacy-patch-CSR
os: ${{ matrix.test-platform }}
- name: Run medium-tests
if: ${{ env.IS_RELEASE == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: medium-tests
os: ${{ matrix.test-platform }}
- name: Run long-tests-1
if: ${{ env.IS_RELEASE == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: long-tests-1
os: ${{ matrix.test-platform }}
- name: Run long-tests-2
if: ${{ env.IS_RELEASE == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: long-tests-2
os: ${{ matrix.test-platform }}
- name: Run long-tests-3
if: ${{ env.IS_RELEASE == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: long-tests-3
os: ${{ matrix.test-platform }}
- name: Installer .deb creation
run: |
cd _build
cpack -G DEB
- name: .tar.gz creation
run: |
cd _build
cpack -G TGZ
- name: Solver archive creation
run: |
cd _build
cmake --install . --prefix install
pushd .
cd install/bin
tar czf ../../antares-solver_ubuntu20.04.tar.gz antares-*-solver libsirius_solver.so
popd
rm -rf install
- name: Installer archive upload push
uses: actions/upload-artifact@v3
with:
path: _build/*.tar.gz
- name: Installer deb upload push
uses: actions/upload-artifact@v3
with:
path: _build/*.deb
publish_assets:
name: Publish assets
needs: build
runs-on: ${{needs.build.outputs.os}}
steps:
- name: Download all artifacts
if: ${{ env.IS_RELEASE == 'true' }}
uses: actions/download-artifact@v3
- name: Publish assets
if: ${{ env.IS_RELEASE == 'true' }}
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["*/*.tar.gz", "*/*.deb"]'