Stay on macOS-13 for now #538
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
on: | |
pull_request: | |
types: [opened] | |
push: | |
schedule: | |
- cron: '0 0 * * 1' | |
jobs: | |
default: | |
runs-on: ${{ matrix.os }} | |
container: ${{ matrix.container }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
- os: macOS-13 | |
- os: windows-latest | |
- os: ubuntu-latest | |
container: | |
image: ubuntu:18.04 | |
extrasetup: | | |
apt-get update -qqq | |
apt-get install -y curl build-essential | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Extra setup | |
shell: bash | |
run: ${{ matrix.extrasetup }} | |
- uses: ./ | |
- run: nim -v | |
- run: nimble -v | |
- name: Test | |
run: nim c -r sample.nim | |
# Check for tags missing from nightlies.txt | |
missing_binary_tags: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- run: ./getnightlies.sh | |
# Compile a list of versions to test with in the next step | |
matrix_prep: | |
runs-on: ubuntu-latest | |
outputs: | |
nimversions: ${{ steps.set-nim-versions.outputs.NIMVERSIONS }} | |
steps: | |
- uses: actions/checkout@v1 | |
- id: set-nim-versions | |
run: | | |
cat > script.py <<EOF | |
import io | |
import json | |
versions = [ | |
'stable', | |
'binary:stable', | |
'2.0', | |
'binary:2.0', | |
'1.6', | |
'binary:1.6', | |
'1.4.0', | |
'nightly:https://github.com/nim-lang/nightlies/releases/tag/2020-11-11-devel-bbe49a14ae827b6474d692042406716a3b3dd71f', | |
'sourcetar:https://github.com/nim-lang/nightlies/releases/download/latest-version-1-4/source.tar.xz', | |
'release:1.2.8', | |
'git:bbe49a14ae827b6474d692042406716a3b3dd71f', | |
'git:v1.4.8', | |
'git:v1.6.10', | |
'git:bbe49a14ae827b6474d692042406716a3b3dd71f https://github.com/iffy/Nim.git', | |
'0.20.0', | |
] | |
with io.open('nightlies.txt', 'r') as fh: | |
for line in fh: | |
if 'https' in line: | |
tag = 'binary:' + line.split()[0] | |
if tag not in versions: | |
versions.append(tag) | |
print("NIMVERSIONS=" + json.dumps(versions)) | |
EOF | |
python script.py >> $GITHUB_OUTPUT | |
- run: echo "${{ steps.set-nim-versions.outputs.NIMVERSIONS }}" | |
specific: | |
needs: | |
- matrix_prep | |
runs-on: ${{ matrix.os }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: | |
- ubuntu-latest | |
- macOS-13 | |
- windows-latest | |
nim: ${{ fromJson(needs.matrix_prep.outputs.nimversions) }} | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: ./ | |
with: | |
version: ${{ matrix.nim }} | |
- run: nim -v | |
- run: nimble -v | |
- name: Test | |
run: nim c -r sample.nim | |
- name: Test installed executable | |
shell: bash | |
run: | | |
set -x | |
echo $PATH | |
cd .github/workflows/sampleproj | |
nimble install --verbose -y | |
nimble path sampleproj | |
hello | |