CI: do not trigger unit tests if basic text files (markdown, LICENSE,… #20
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
name: CI | |
on: | |
push: | |
branches: [main] | |
paths-ignore: | |
- '*.md' | |
- 'LICENSE' | |
- '*.cff' | |
- '*.options' | |
- 'uno_ampl-completion.bash' | |
pull_request: | |
types: [opened, synchronize, ready_for_review, reopened] | |
# needed to allow julia-actions/cache to delete old caches that it has created | |
permissions: | |
actions: write | |
contents: read | |
jobs: | |
test: | |
name: Julia - ${{ github.event_name }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Uno | |
uses: actions/checkout@v4 | |
- name: Install Julia 1.7 | |
uses: julia-actions/setup-julia@v2 | |
with: | |
version: "1.7" | |
arch: x64 | |
- name: Set the environment variables BINARYBUILDER_AUTOMATIC_APPLE, UNO_RELEASE, UNO_COMMIT | |
shell: bash | |
run: | | |
echo "BINARYBUILDER_AUTOMATIC_APPLE=true" >> $GITHUB_ENV | |
echo "UNO_RELEASE=1.1.1" >> $GITHUB_ENV | |
if [ "${{ github.event_name }}" = "pull_request" ]; then | |
echo "UNO_COMMIT=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV | |
echo "UNO_URL=${{ github.event.pull_request.head.repo.clone_url }}" >> $GITHUB_ENV | |
else | |
echo "UNO_COMMIT=${{ github.sha }}" >> $GITHUB_ENV | |
echo "UNO_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV | |
fi | |
- name: Generate Uno_jll.jl | |
run: | | |
julia --color=yes -e 'using Pkg; Pkg.add("BinaryBuilder")' | |
julia --color=yes .github/julia/build_tarballs_yggdrasil.jl x86_64-linux-gnu-libgfortran5 --verbose --deploy="local" | |
- name: Install Julia LTS | |
uses: julia-actions/setup-julia@v2 | |
with: | |
version: "1.10" | |
arch: x64 | |
- name: Test AmplNLWriter.jl | |
shell: bash | |
run: | | |
git clone https://github.com/jump-dev/AmplNLWriter.jl | |
cd AmplNLWriter.jl/test/MINLPTests/ | |
julia --project --color=yes -e 'using Pkg; Pkg.develop(path="/home/runner/.julia/dev/Uno_jll"); Pkg.develop(path="../.."); Pkg.instantiate(); include("run_minlptests.jl")' |