improve condition perfomance #40
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: Tests 🧪 | |
on: | |
push: | |
branches: | |
- 'master' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
nim_version: | |
- '1.6.16' | |
- '2.0.0' | |
- '2.0.2' | |
- '2.0.4' | |
env: | |
TIMEOUT_EXIT_STATUS: 124 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache nimble | |
id: cache-nimble | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nimble | |
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }} | |
- uses: jiro4989/setup-nim-action@v1 | |
with: | |
nim-version: ${{ matrix.nim_version }} | |
- name: Install Dependencies 🔃 | |
run: | | |
nimble refresh | |
nimble install -y -d | |
- name: Build C tests 🔨 | |
run: | | |
cd tests | |
for file in $(ls -v test*.nim); do | |
nim c -r --opt:size --passC:-flto --passL:-flto -d:strip -d:danger $file | |
done | |
shell: bash | |
- name: Build C++ tests 🔨 | |
run: | | |
cd tests | |
for file in $(ls -v test*.nim); do | |
nim cpp -r --opt:size --passC:-flto --passL:-flto -d:strip -d:danger $file | |
done | |
shell: bash | |
- name: Build JavaScript tests 🔨 | |
run: | | |
cd tests | |
for file in $(ls -v test*.nim); do | |
nim js -r --opt:size -d:danger $file | |
done | |
shell: bash |