diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d6cce72..f511f8cb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,70 +11,52 @@ permissions: read-all jobs: Ubuntu: - runs-on: ubuntu-latest + strategy: + matrix: + runner: [ ubuntu-20.04, ubuntu-latest ] + runs-on: ${{ matrix.runner }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Build Ubuntu run: | ./configure --with-fastfloat --with-threaded make make check - Ubuntu-20-04: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - name: Build Ubuntu - run: | - ./configure --with-fastfloat --with-threaded - make - make check - - MacOS: - runs-on: macos-latest + macOS: + strategy: + matrix: + runner: [ macos-12, macos-14 ] + runs-on: ${{ matrix.runner }} steps: - - uses: actions/checkout@v2 - - name: Build MacOS + - uses: actions/checkout@v4 + - name: Build macOS run: | ./configure --with-fastfloat --with-threaded make make check - Windows-64: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v2 - - uses: ilammy/msvc-dev-cmd@v1 - with: - arch: x64 - - - name: Build Windows 64 bit - run: devenv .\Projects\VC2019\lcms2.sln /Rebuild "Release|x64" /Project testbed - - - name: Run tests - run: testbed\testbed.exe --chdir testbed - - - Windows-32: + Windows: + strategy: + matrix: + arch: [ win32, x64 ] runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: ilammy/msvc-dev-cmd@v1 with: - arch: win32 - - - name: Build Windows 32 bit - run: devenv .\Projects\VC2019\lcms2.sln /Rebuild "Release|Win32" /Project testbed + arch: ${{ matrix.arch }} - - name: Run tests + - name: Build Windows + run: devenv .\Projects\VC2019\lcms2.sln /Rebuild "Release|${{ matrix.arch }}" /Project testbed + + - name: Run tests run: testbed\testbed.exe --chdir testbed - - + Ubuntu-meson: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install packages run: | @@ -91,7 +73,7 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install packages run: | diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 5ebb981e..9f1fcd21 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -36,7 +36,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. @@ -44,7 +44,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -55,7 +55,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -69,4 +69,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 901a86cd..14ade9f4 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -25,12 +25,12 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: persist-credentials: false - name: "Run analysis" - uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2 + uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 with: results_file: results.sarif results_format: sarif @@ -42,7 +42,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0 + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 with: name: SARIF file path: results.sarif @@ -50,6 +50,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4 + uses: github/codeql-action/upload-sarif@dc021d495cb77b369e4d9d04a501700fd83b8c51 # v2.24.0 with: sarif_file: results.sarif diff --git a/src/cmsvirt.c b/src/cmsvirt.c index 6084647e..59cf2bfd 100644 --- a/src/cmsvirt.c +++ b/src/cmsvirt.c @@ -745,6 +745,8 @@ cmsHPROFILE CMSEXPORT cmsCreate_OkLabProfile(cmsContext ctx) cmsPipeline* BToA = cmsPipelineAlloc(ctx, 3, 3); cmsHPROFILE hProfile = cmsCreateProfilePlaceholder(ctx); + if (!hProfile) // can't allocate + goto error; cmsSetProfileVersion(hProfile, 4.4);